summaryrefslogtreecommitdiff
path: root/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins')
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Defines.cginc24
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Defines.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Functions.cginc162
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Functions.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Properties.cginc22
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Properties.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_VertInject.cginc14
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_VertInject.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivPenetrationForPoiyomiPro.unitypackagebin0 -> 2982 bytes
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivPenetrationForPoiyomiPro.unitypackage.meta7
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources/MultiGradient_Object_Ico.pngbin0 -> 57419 bytes
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources/MultiGradient_Object_Ico.png.meta99
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSGradientEditor.cs483
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSGradientEditor.cs.meta11
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSMultiGradient.cs9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSMultiGradient.cs.meta11
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSReimportMyShadersPlease.cs33
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSReimportMyShadersPlease.cs.meta11
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSStyles.cs320
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSStyles.cs.meta11
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSTextureMerger.cs240
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSTextureMerger.cs.meta11
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSToonInspector.cs734
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSToonInspector.cs.meta11
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSUpdater.cs210
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSUpdater.cs.meta11
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/LICENSE21
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/LICENSE.meta7
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSDefines.cginc216
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSDefines.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSFrag.cginc88
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSFrag.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSGeom.cginc95
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSGeom.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSHelperFunctions.cginc395
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSHelperFunctions.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLighting.cginc118
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLighting.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLightingFunctions.cginc428
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLightingFunctions.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSShadowCaster.cginc170
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSShadowCaster.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSVert.cginc32
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSVert.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/OrificeDefines.cginc12
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/OrificeDefines.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/PenetratorDefines.cginc12
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/PenetratorDefines.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSDefinesOrifice.cginc217
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSDefinesOrifice.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSFrag.cginc90
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSFrag.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVert.cginc152
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVert.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVertOrifice.cginc118
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVertOrifice.cginc.meta9
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Orifice.shader202
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Orifice.shader.meta24
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Penetrator.shader202
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Penetrator.shader.meta24
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders/Nothing Here.txt1
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders/Nothing Here.txt.meta7
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/README.md1
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/README.md.meta7
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_3Light.exrbin0 -> 2015421 bytes
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_3Light.exr.meta100
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_SoftUnder_3Mid.exrbin0 -> 3657049 bytes
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_SoftUnder_3Mid.exr.meta100
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated.meta8
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/gray to white.pngbin0 -> 121 bytes
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/gray to white.png.meta88
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/redgradient.pngbin0 -> 100 bytes
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/redgradient.png.meta88
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient.pngbin0 -> 113 bytes
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient.png.meta99
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient2.pngbin0 -> 111 bytes
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient2.png.meta88
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/smoothcutoff black to white.pngbin0 -> 126 bytes
-rw-r--r--VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/smoothcutoff black to white.png.meta99
92 files changed, 6009 insertions, 0 deletions
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Defines.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Defines.cginc
new file mode 100644
index 00000000..cdf84b26
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Defines.cginc
@@ -0,0 +1,24 @@
+#ifdef RALIV_PENETRATOR
+ uniform float _SqueezeDist;
+ uniform float _Length;
+ uniform float _Wriggle;
+ uniform float _BulgePower;
+ uniform float _BulgeOffset;
+ uniform float _WriggleSpeed;
+ uniform float _ReCurvature;
+ uniform float _Curvature;
+ uniform float _Squeeze;
+ uniform float _EntranceStiffness;
+#endif
+#ifdef RALIV_ORIFICE
+ uniform sampler2D _OrificeData;
+ uniform float _EntryOpenDuration;
+ uniform float _Shape1Depth;
+ uniform float _Shape1Duration;
+ uniform float _Shape2Depth;
+ uniform float _Shape2Duration;
+ uniform float _Shape3Depth;
+ uniform float _Shape3Duration;
+ uniform float _BlendshapePower;
+ uniform float _BlendshapeBadScaleFix;
+#endif \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Defines.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Defines.cginc.meta
new file mode 100644
index 00000000..c73ed1ad
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Defines.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 50bf305659786d34ebfaaa3239913238
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Functions.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Functions.cginc
new file mode 100644
index 00000000..5a671d8c
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Functions.cginc
@@ -0,0 +1,162 @@
+void GetBestLights( float Channel, inout int orificeType, inout float3 orificePositionTracker, inout float3 orificeNormalTracker, inout float3 penetratorPositionTracker, inout float penetratorLength ) {
+ float ID = step( 0.5 , Channel );
+ float baseID = ( ID * 0.02 );
+ float holeID = ( baseID + 0.01 );
+ float ringID = ( baseID + 0.02 );
+ float normalID = ( 0.05 + ( ID * 0.01 ) );
+ float penetratorID = ( 0.09 + ( ID * -0.01 ) );
+ float4 orificeWorld;
+ float4 orificeNormalWorld;
+ float4 penetratorWorld;
+ float penetratorDist=100;
+ for (int i=0;i<4;i++) {
+ float range = (0.005 * sqrt(1000000 - unity_4LightAtten0[i])) / sqrt(unity_4LightAtten0[i]);
+ if (length(unity_LightColor[i].rgb) < 0.01) {
+ if (abs(fmod(range,0.1)-holeID)<0.005) {
+ orificeType=0;
+ orificeWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ orificePositionTracker = mul( unity_WorldToObject, orificeWorld ).xyz;
+ }
+ if (abs(fmod(range,0.1)-ringID)<0.005) {
+ orificeType=1;
+ orificeWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ orificePositionTracker = mul( unity_WorldToObject, orificeWorld ).xyz;
+ }
+ if (abs(fmod(range,0.1)-normalID)<0.005) {
+ orificeNormalWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ orificeNormalTracker = mul( unity_WorldToObject, orificeNormalWorld ).xyz;
+ }
+ if (abs(fmod(range,0.1)-penetratorID)<0.005) {
+ float3 tempPenetratorPositionTracker = penetratorPositionTracker;
+ penetratorWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ penetratorPositionTracker = mul( unity_WorldToObject, penetratorWorld ).xyz;
+ if (length(penetratorPositionTracker)>length(tempPenetratorPositionTracker)) {
+ penetratorPositionTracker = tempPenetratorPositionTracker;
+ } else {
+ penetratorLength=unity_LightColor[i].a;
+ }
+ }
+ }
+ }
+}
+
+#ifdef RALIV_PENETRATOR
+
+void PenetratorReshape(inout float4 vertex, inout float3 normal) {
+ float orificeChannel=0;
+ float orificeType = 0;
+ float3 orificePositionTracker = float3(0,0,100);
+ float3 orificeNormalTracker = float3(0,0,99);
+ float3 penetratorPositionTracker = float3(0,0,1);
+ float3 penetratorNormalTracker = float3(0,0,1);
+ float pl=0;
+ GetBestLights(orificeChannel, orificeType, orificePositionTracker, orificeNormalTracker, penetratorNormalTracker, pl);
+ float3 orificeNormal = normalize( lerp( ( orificePositionTracker - orificeNormalTracker ) , orificePositionTracker , max( _EntranceStiffness , 0.01 )) );
+ float behind = smoothstep(-_Length*0.5, _Length*0.2, orificePositionTracker.z);
+ //orificePositionTracker.xy = behind * orificePositionTracker.xy;
+ //orificeNormal.xy = behind * orificeNormal.xy;
+ orificePositionTracker.z=(abs(orificePositionTracker.z+(_Length*0.2))-(_Length*0.2))*(1+step(orificePositionTracker.z,0)*2);
+ orificePositionTracker.z=smoothstep(-_Length*0.2, _Length*0.2, orificePositionTracker.z) * orificePositionTracker.z;
+ float distanceToOrifice = length( orificePositionTracker );
+ float3 PhysicsNormal = normalize(penetratorNormalTracker.xyz);
+ float enterFactor = smoothstep( _Length , _Length+0.05 , distanceToOrifice);
+ float wriggleTimeY = _Time.y * _WriggleSpeed;
+ float curvatureMod = ( _Length * ( ( cos( wriggleTimeY ) * _Wriggle ) + _Curvature ) );
+ float wriggleTimeX = _Time.y * ( _WriggleSpeed * 0.79 );
+ float3 finalOrificeNormal = normalize( lerp( orificeNormal , ( PhysicsNormal + ( ( float3(0,1,0) * ( curvatureMod + ( _Length * ( _ReCurvature + ( ( sin( wriggleTimeY ) * 0.3 ) * _Wriggle ) ) * 2.0 ) ) ) + ( float3(0.5,0,0) * ( cos( wriggleTimeX ) * _Wriggle ) ) ) ) , enterFactor) );
+ float3 finalOrificePosition = lerp( orificePositionTracker , ( ( normalize(penetratorNormalTracker) * _Length ) + ( float3(0,0.2,0) * ( sin( ( wriggleTimeY + UNITY_PI ) ) * _Wriggle ) * _Length ) + ( float3(0.2,0,0) * _Length * ( sin( ( wriggleTimeX + UNITY_PI ) ) * _Wriggle ) ) ) , enterFactor);
+ float finalOrificeDistance = length( finalOrificePosition );
+ float3 bezierBasePosition = float3(0,0,0);
+ float bezierDistanceThird = ( finalOrificeDistance / 3.0 );
+ float3 curvatureOffset = lerp( float3( 0,0,0 ) , ( float3(0,1,0) * ( curvatureMod * -0.2 ) ) , saturate( ( distanceToOrifice / _Length ) ));
+ float3 bezierBaseNormal = ( ( bezierDistanceThird * float3(0,0,1) ) + curvatureOffset );
+ float3 bezierOrificeNormal = ( finalOrificePosition - ( bezierDistanceThird * finalOrificeNormal ) );
+ float3 bezierOrificePosition = finalOrificePosition;
+ float vertexBaseTipPosition = ( vertex.z / finalOrificeDistance );
+
+ float3 sphereifyDistance = ( vertex.xyz - float3(0,0, distanceToOrifice) );
+ float3 sphereifyNormal = normalize( sphereifyDistance );
+ float sphereifyFactor = smoothstep( 0.01 , -0.01 , distanceToOrifice - vertex.z);
+ sphereifyFactor *= 1-orificeType;
+ vertex.xyz = lerp( vertex.xyz , ( float3(0,0, distanceToOrifice) + ( min( length( sphereifyDistance ) , _Squeeze ) * sphereifyNormal ) ) , sphereifyFactor);
+
+ float squeezeFactor = smoothstep( 0.0 , _SqueezeDist , vertex.z - distanceToOrifice);
+ squeezeFactor = max( squeezeFactor , smoothstep( 0.0 , _SqueezeDist , distanceToOrifice - vertex.z));
+ squeezeFactor = 1- (1-squeezeFactor) * smoothstep(0,0.01,vertex.z) * behind * (1-enterFactor);
+ vertex.xy = lerp( ( normalize(vertex.xy) * min( length( vertex.xy ) , _Squeeze ) ) , vertex.xy , squeezeFactor);
+
+ float bulgeFactor = 1-smoothstep( 0.0 , _BulgeOffset , abs( ( finalOrificeDistance - vertex.z ) ));
+ float bulgeFactorBaseClip = smoothstep( 0.0 , 0.05 , vertex.z);
+ vertex.xy *= lerp( 1.0 , ( 1.0 + _BulgePower) , ( bulgeFactor * bulgeFactorBaseClip * behind * (1-enterFactor)));
+
+ float t = saturate(vertexBaseTipPosition);
+ float oneMinusT = 1 - t;
+ float3 bezierPoint = oneMinusT * oneMinusT * oneMinusT * bezierBasePosition + 3 * oneMinusT * oneMinusT * t * bezierBaseNormal + 3 * oneMinusT * t * t * bezierOrificeNormal + t * t * t * bezierOrificePosition;
+ float3 straightLine = (float3(0.0 , 0.0 , vertex.z));
+ float baseFactor = smoothstep( 0.05 , -0.05 , vertex.z);
+ bezierPoint = lerp( bezierPoint , straightLine , baseFactor);
+ bezierPoint = lerp( ( ( finalOrificeNormal * ( vertex.z - finalOrificeDistance ) ) + finalOrificePosition ) , bezierPoint , step( vertexBaseTipPosition , 1.0 ));
+ float3 bezierDerivitive = 3 * oneMinusT * oneMinusT * (bezierBaseNormal - bezierBasePosition) + 6 * oneMinusT * t * (bezierOrificeNormal - bezierBaseNormal) + 3 * t * t * (bezierOrificePosition - bezierOrificeNormal);
+ bezierDerivitive = normalize( lerp( bezierDerivitive , float3(0,0,1) , baseFactor) );
+ float bezierUpness = dot( bezierDerivitive , float3( 0,1,0 ) );
+ float3 bezierUp = lerp( float3(0,1,0) , float3( 0,0,-1 ) , saturate( bezierUpness ));
+ float bezierDownness = dot( bezierDerivitive , float3( 0,-1,0 ) );
+ bezierUp = normalize( lerp( bezierUp , float3( 0,0,1 ) , saturate( bezierDownness )) );
+ float3 bezierSpaceX = normalize( cross( bezierDerivitive , bezierUp ) );
+ float3 bezierSpaceY = normalize( cross( bezierDerivitive , -bezierSpaceX ) );
+ float3 bezierSpaceVertexOffset = ( ( vertex.y * bezierSpaceY ) + ( vertex.x * -bezierSpaceX ) );
+ float3 bezierSpaceVertexOffsetNormal = normalize( bezierSpaceVertexOffset );
+ float distanceFromTip = ( finalOrificeDistance - vertex.z );
+
+ float3 bezierSpaceVertexOffsetFinal = lerp( bezierSpaceVertexOffset , bezierSpaceVertexOffset , enterFactor);
+ float3 bezierConstructedVertex = ( bezierPoint + bezierSpaceVertexOffsetFinal );
+
+ normal = normalize( ( ( -bezierSpaceX * normal.x ) + ( bezierSpaceY * normal.y ) + ( bezierDerivitive * normal.z ) ) );
+ vertex.xyz = bezierConstructedVertex;
+
+ vertex.w = 1;
+}
+
+#endif
+
+#ifdef RALIV_ORIFICE
+
+ float3 getBlendOffset(float blendSampleIndex, float activationDepth, float activationSmooth, int vertexID, float penetrationDepth, float3 normal, float3 tangent, float3 binormal) {
+ float blendTextureSize = 1024;
+ float2 blendSampleUV = (float2(( ( fmod( (float)vertexID , blendTextureSize ) + 0.5 ) / (blendTextureSize) ) , ( ( ( floor( ( vertexID / (blendTextureSize) ) ) + 0.5 ) / (blendTextureSize) ) + blendSampleIndex/8 )));
+ float3 sampledBlend = tex2Dlod( _OrificeData, float4( blendSampleUV, 0, 0.0) ).rgb;
+ float blendActivation = smoothstep( ( activationDepth ) , ( activationDepth + activationSmooth ) , penetrationDepth);
+ blendActivation = -cos(blendActivation*3.1416)*0.5+0.5;
+ float3 blendOffset = ( ( sampledBlend - float3(1,1,1)) * (blendActivation) * _BlendshapePower * _BlendshapeBadScaleFix );
+ return ( ( blendOffset.x * normal ) + ( blendOffset.y * tangent ) + ( blendOffset.z * binormal ) );
+ }
+
+ void OrificeReshape(inout float4 vertex, inout float3 normal, float3 tangent, int vertexId) {
+ float orificeChannel=0;
+ float penetratorLength = 0.1;
+ float penetratorDistance;
+ float3 orificePositionTracker = float3(0,0,-100);
+ float3 orificeNormalTracker = float3(0,0,-99);
+ float3 penetratorPositionTracker = float3(0,0,100);
+ float orificeType=0;
+
+ GetBestLights(orificeChannel, orificeType, orificePositionTracker, orificeNormalTracker, penetratorPositionTracker, penetratorLength);
+ penetratorDistance = distance(orificePositionTracker, penetratorPositionTracker );
+ float penetrationDepth = max(0, penetratorLength - penetratorDistance);
+
+ float3 binormal = normalize(cross( normal , tangent ));
+
+ vertex.xyz += getBlendOffset(0, 0, _EntryOpenDuration, vertexId, penetrationDepth, normal, tangent, binormal);
+ vertex.xyz += getBlendOffset(2, _Shape1Depth, _Shape1Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ vertex.xyz += getBlendOffset(4, _Shape2Depth, _Shape2Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ vertex.xyz += getBlendOffset(6, _Shape3Depth, _Shape3Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ vertex.w = 1;
+
+ normal += getBlendOffset(1, 0, _EntryOpenDuration, vertexId, penetrationDepth, normal, tangent, binormal);
+ normal += getBlendOffset(3, _Shape1Depth, _Shape1Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ normal += getBlendOffset(5, _Shape2Depth, _Shape2Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ normal += getBlendOffset(7, _Shape3Depth, _Shape3Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ normal = normalize(normal);
+ }
+
+#endif \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Functions.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Functions.cginc.meta
new file mode 100644
index 00000000..bdc9c331
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Functions.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 03511e8004c25ec428c695e620454236
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Properties.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Properties.cginc
new file mode 100644
index 00000000..79ee219d
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Properties.cginc
@@ -0,0 +1,22 @@
+// PENETRATOR
+_Squeeze("Squeeze Minimum Size", Range( 0 , 0.2)) = 0
+_SqueezeDist("Squeeze Smoothness", Range( 0 , 0.1)) = 0
+_BulgePower("Bulge Amount", Range( 0 , 0.01)) = 0
+_BulgeOffset("Bulge Length", Range( 0 , 0.3)) = 0
+_Length("Length of Penetrator Model", Range( 0 , 3)) = 0
+_EntranceStiffness("Entrance Stiffness", Range( 0.01 , 1)) = 0.01
+_Curvature("Curvature", Range( -1 , 1)) = 0
+_ReCurvature("ReCurvature", Range( -1 , 1)) = 0
+_Wriggle("Wriggle Amount", Range( 0 , 1)) = 0
+_WriggleSpeed("Wriggle Speed", Range( 0.1 , 30)) = 0.28
+// ORIFICE
+_OrificeData("OrificeData", 2D) = "white" {}
+_EntryOpenDuration("Entry Trigger Duration", Range( 0 , 1)) = 0.1
+_Shape1Depth("Shape 1 Trigger Depth", Range( 0 , 5)) = 0.1
+_Shape1Duration("Shape 1 Trigger Duration", Range( 0 , 1)) = 0.1
+_Shape2Depth("Shape 2 Trigger Depth", Range( 0 , 5)) = 0.2
+_Shape2Duration("Shape 2 Trigger Duration", Range( 0 , 1)) = 0.1
+_Shape3Depth("Shape 3 Trigger Depth", Range( 0 , 5)) = 0.3
+_Shape3Duration("Shape 3 Trigger Duration", Range( 0 , 1)) = 0.1
+_BlendshapePower("Blend Shape Power", Range(0,5)) = 1
+_BlendshapeBadScaleFix("Blend Shape Bad Scale Fix", Range(1,100)) = 1 \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Properties.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Properties.cginc.meta
new file mode 100644
index 00000000..c14ae70e
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_Properties.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: ba9e2b8e292fe894b9d8a09535e37603
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_VertInject.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_VertInject.cginc
new file mode 100644
index 00000000..ffc3637d
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_VertInject.cginc
@@ -0,0 +1,14 @@
+#ifdef RALIV_PENETRATOR
+ #ifdef UNITY_PASS_FORWARDBASE
+ PenetratorReshape(v.vertex, v.normal);
+ #else
+ v.vertex=float4(0,0,0,1);
+ #endif
+#endif
+#ifdef RALIV_ORIFICE
+ #ifdef UNITY_PASS_FORWARDBASE
+ OrificeReshape(v.vertex, v.normal, v.tangent, v.vertexId);
+ #else
+ v.vertex=float4(0,0,0,1);
+ #endif
+#endif \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_VertInject.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_VertInject.cginc.meta
new file mode 100644
index 00000000..2c92266e
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivDPS_VertInject.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 77ed7baa735cc5c4da0482af75ac0a19
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivPenetrationForPoiyomiPro.unitypackage b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivPenetrationForPoiyomiPro.unitypackage
new file mode 100644
index 00000000..3ef36429
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivPenetrationForPoiyomiPro.unitypackage
Binary files differ
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivPenetrationForPoiyomiPro.unitypackage.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivPenetrationForPoiyomiPro.unitypackage.meta
new file mode 100644
index 00000000..9036e959
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/RalivPenetrationForPoiyomiPro.unitypackage.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: e1984743beec35f438c63e841a8eea86
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development.meta
new file mode 100644
index 00000000..fa7e29e3
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e5f8020b10a79f0419dfd48d2b8bd89f
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor.meta
new file mode 100644
index 00000000..65f30dc8
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c94aff727f4003548811fdd9a64f4683
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources.meta
new file mode 100644
index 00000000..19e4a1b9
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: aca68975822e99b4bbae7f77e8ad97ab
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources/MultiGradient_Object_Ico.png b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources/MultiGradient_Object_Ico.png
new file mode 100644
index 00000000..6daac1ff
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources/MultiGradient_Object_Ico.png
Binary files differ
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources/MultiGradient_Object_Ico.png.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources/MultiGradient_Object_Ico.png.meta
new file mode 100644
index 00000000..b7bdefd6
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/Resources/MultiGradient_Object_Ico.png.meta
@@ -0,0 +1,99 @@
+fileFormatVersion: 2
+guid: 46cf37146afb9a74782ce51bed717569
+TextureImporter:
+ fileIDToRecycleName: {}
+ externalObjects: {}
+ serializedVersion: 9
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 0
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: -1
+ mipBias: -100
+ wrapU: -1
+ wrapV: -1
+ wrapW: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ singleChannelComponent: 0
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - serializedVersion: 2
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ - serializedVersion: 2
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID:
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSGradientEditor.cs b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSGradientEditor.cs
new file mode 100644
index 00000000..6170b6f6
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSGradientEditor.cs
@@ -0,0 +1,483 @@
+using UnityEngine;
+using UnityEditor;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System;
+using UnityEditorInternal;
+
+namespace XSToonDynamicPenetration
+{
+ public class XSGradientEditor : EditorWindow
+ {
+ public List<int> gradients_index = new List<int>(new int[1] { 0 });
+ public List<Gradient> gradients = new List<Gradient>(5);
+ public Texture2D tex;
+
+ private string finalFilePath;
+
+ private bool isLinear = false;
+ private bool manualMaterial = false;
+ private enum Resolutions
+ {
+ Tiny64x8 = 64,
+ Small128x8 = 128,
+ Medium256x8 = 256,
+ Large512x8 = 512
+ }
+ private Resolutions res = Resolutions.Tiny64x8;
+ public static Material focusedMat;
+ private Material oldFocusedMat;
+ private Texture oldTexture;
+ private string rampProperty = "_Ramp";
+ private ReorderableList grad_index_reorderable;
+ private bool reorder;
+ private static GUIContent iconToolbarPlus;
+ private static GUIContent iconToolbarMinus;
+ private static GUIStyle preButton;
+ private static GUIStyle buttonBackground;
+ private bool changed;
+ private int loadGradIndex;
+ private XSMultiGradient xsmg;
+ private Vector2 scrollPos;
+
+ private bool dHelpText = false;
+ //private bool dAdvanced = false;
+
+ [MenuItem("Tools/Xiexe/XSToon/Gradient Editor")]
+ static public void Init()
+ {
+ XSGradientEditor window = EditorWindow.GetWindow<XSGradientEditor>(false, "XSToon: Gradient Editor", true);
+ window.minSize = new Vector2(450, 390);
+ }
+
+ public void OnGUI()
+ {
+ changed = false;
+ if (focusedMat != null)
+ {
+ XSStyles.ShurikenHeader("Current Material: " + focusedMat.name);
+ }
+ else
+ {
+ XSStyles.ShurikenHeader("Current Material: None");
+ }
+
+ if (preButton == null)
+ {
+ iconToolbarPlus = EditorGUIUtility.IconContent("Toolbar Plus", "Add Gradient");
+ iconToolbarMinus = EditorGUIUtility.IconContent("Toolbar Minus", "Remove Gradient");
+ preButton = new GUIStyle("RL FooterButton");
+ buttonBackground = new GUIStyle("RL Header");
+ }
+
+ if (gradients.Count == 0)
+ {
+ gradients.Add(new Gradient());
+ gradients.Add(new Gradient());
+ gradients.Add(new Gradient());
+ gradients.Add(new Gradient());
+ gradients.Add(new Gradient());
+ }
+
+ if (grad_index_reorderable == null)
+ {
+ makeReorderedList();
+ }
+
+ GUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+ Rect r = EditorGUILayout.GetControlRect();
+ float rightEdge = r.xMax;
+ float leftEdge = rightEdge - 48f;
+ r = new Rect(leftEdge, r.y, rightEdge - leftEdge, r.height);
+ if (Event.current.type == EventType.Repaint) buttonBackground.Draw(r, false, false, false, false);
+ leftEdge += 18f;
+ EditorGUI.BeginDisabledGroup(gradients_index.Count == 5);
+ bool addE = GUI.Button(new Rect(leftEdge + 4, r.y, 25, 13), iconToolbarPlus, preButton);
+ EditorGUI.EndDisabledGroup();
+ EditorGUI.BeginDisabledGroup(gradients_index.Count == 1);
+ bool removeE = GUI.Button(new Rect(leftEdge - 19, r.y, 25, 13), iconToolbarMinus, preButton);
+ EditorGUI.EndDisabledGroup();
+
+ if (addE)
+ {
+ grad_index_reorderable.index++;
+ int wat = 0;
+ for (int i = 0; i < 5; i++)
+ {
+ if (!gradients_index.Contains(i))
+ {
+ wat = i;
+ break;
+ }
+ }
+ gradients_index.Add(wat);
+ changed = true;
+ }
+ if (removeE)
+ {
+ gradients_index.Remove(gradients_index[gradients_index.Count - 1]);
+ grad_index_reorderable.index--;
+ changed = true;
+ }
+
+ GUIStyle button = new GUIStyle(EditorStyles.miniButton);
+ button.normal = !reorder ? EditorStyles.miniButton.normal : EditorStyles.miniButton.onNormal;
+ if (GUILayout.Button(new GUIContent("Reorder", "Don't use Reorder if you want to undo a gradient change"), button, GUILayout.ExpandWidth(false)))
+ {
+ reorder = !reorder;
+ }
+ GUILayout.EndHorizontal();
+
+ SerializedObject serializedObject = new SerializedObject(this);
+ if (reorder)
+ {
+ grad_index_reorderable.DoLayoutList();
+ }
+ else
+ {
+ SerializedProperty colorGradients = serializedObject.FindProperty("gradients");
+ if (colorGradients.arraySize == 5)
+ {
+ for (int i = 0; i < gradients_index.Count; i++)
+ {
+ Rect _r = EditorGUILayout.GetControlRect();
+ _r.x += 16f;
+ _r.width -= 2f + 16f;
+ _r.height += 5f;
+ _r.y += 2f + (3f * i);
+ EditorGUI.PropertyField(_r, colorGradients.GetArrayElementAtIndex(gradients_index[i]), new GUIContent(""));
+ }
+ GUILayout.Space(Mathf.Lerp(9f, 24f, gradients_index.Count / 5f));
+ }
+ }
+ if (serializedObject.ApplyModifiedProperties()) changed = true;
+
+ if (oldFocusedMat != focusedMat)
+ {
+ changed = true;
+ if (this.oldTexture != null)
+ {
+ if (this.oldTexture == EditorGUIUtility.whiteTexture) this.oldTexture = null;
+ oldFocusedMat.SetTexture(rampProperty, this.oldTexture);
+ this.oldTexture = null;
+ }
+ oldFocusedMat = focusedMat;
+ }
+
+ Resolutions oldRes = res;
+ res = (Resolutions)EditorGUILayout.EnumPopup("Resolution: ", res);
+ if (oldRes != res) changed = true;
+
+ int width = (int)res;
+ int height = 30;
+ if (gradients_index.Count == 1)
+ {
+ height = 8;
+ }
+ else
+ {
+ height = 150;
+ }
+ if (tex == null)
+ {
+ tex = new Texture2D(width, height, TextureFormat.RGBA32, false);
+ }
+
+ bool old_isLinear = isLinear;
+ drawAdvancedOptions();
+ if (old_isLinear != isLinear)
+ {
+ changed = true;
+ }
+
+ if (manualMaterial)
+ {
+ focusedMat = (Material)EditorGUILayout.ObjectField(new GUIContent("", ""), focusedMat, typeof(Material), true);
+ }
+
+ if (focusedMat != null)
+ {
+ if (focusedMat.HasProperty("_Ramp"))
+ {
+ rampProperty = "_Ramp";
+ }
+ else
+ {
+ rampProperty = EditorGUILayout.TextField("Ramp Property Name", rampProperty);
+ if (!focusedMat.HasProperty(rampProperty))
+ {
+ GUILayout.Label("Property not found!");
+ }
+ }
+ }
+
+ if (changed)
+ {
+ updateTexture(width, height);
+ if (focusedMat != null)
+ {
+ if (focusedMat.HasProperty(rampProperty))
+ {
+ if (this.oldTexture == null)
+ {
+ if (focusedMat.GetTexture(rampProperty) == null)
+ {
+ this.oldTexture = EditorGUIUtility.whiteTexture;
+ }
+ else
+ {
+ this.oldTexture = focusedMat.GetTexture(rampProperty);
+ }
+ }
+ tex.wrapMode = TextureWrapMode.Clamp;
+ tex.Apply(false, false);
+ focusedMat.SetTexture(rampProperty, tex);
+ }
+ }
+ }
+
+ XSStyles.Separator();
+ drawMGInputOutput();
+
+
+ if (GUILayout.Button("Save Ramp"))
+ {
+ finalFilePath = XSStyles.findAssetPath(finalFilePath);
+ string path = EditorUtility.SaveFilePanel("Save Ramp as PNG", finalFilePath + "/Textures/Shadow Ramps/Generated", "gradient", "png");
+ if (path.Length != 0)
+ {
+ updateTexture(width, height);
+ bool success = GenTexture(tex, path);
+ if (success)
+ {
+ if (focusedMat != null)
+ {
+ string s = path.Substring(path.IndexOf("Assets"));
+ Texture ramp = AssetDatabase.LoadAssetAtPath<Texture>(s);
+ if (ramp != null)
+ {
+ focusedMat.SetTexture(rampProperty, ramp);
+ this.oldTexture = null;
+ }
+ }
+ }
+ }
+ }
+ drawHelpText();
+ }
+
+ Gradient reflessGradient(Gradient old_grad)
+ {
+ Gradient grad = new Gradient();
+ grad.SetKeys(old_grad.colorKeys, old_grad.alphaKeys);
+ grad.mode = old_grad.mode;
+ return grad;
+ }
+
+ List<int> reflessIndexes(List<int> old_indexes)
+ {
+ List<int> indexes = new List<int>();
+ for (int i = 0; i < old_indexes.Count; i++)
+ {
+ indexes.Add(old_indexes[i]);
+ }
+ return indexes;
+ }
+
+ void makeReorderedList()
+ {
+ grad_index_reorderable = new ReorderableList(gradients_index, typeof(int), true, false, false, false);
+ grad_index_reorderable.headerHeight = 0f;
+ grad_index_reorderable.footerHeight = 0f;
+ grad_index_reorderable.showDefaultBackground = true;
+
+ grad_index_reorderable.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) =>
+ {
+ if (gradients.Count == 5)
+ {
+ Type editorGui = typeof(EditorGUI);
+ MethodInfo mi = editorGui.GetMethod("GradientField", BindingFlags.NonPublic | BindingFlags.Static, null, new Type[2] { typeof(Rect), typeof(Gradient) }, null);
+ mi.Invoke(this, new object[2] { rect, gradients[gradients_index[index]] });
+ if (Event.current.type == EventType.Repaint)
+ {
+ changed = true;
+ }
+ }
+ };
+
+ grad_index_reorderable.onChangedCallback = (ReorderableList list) =>
+ {
+ changed = true;
+ };
+ }
+
+ void OnDestroy()
+ {
+ if (focusedMat != null)
+ {
+ if (this.oldTexture != null)
+ {
+ if (this.oldTexture == EditorGUIUtility.whiteTexture)
+ {
+ this.oldTexture = null;
+ }
+ focusedMat.SetTexture(rampProperty, this.oldTexture);
+ this.oldTexture = null;
+ }
+ focusedMat = null;
+ }
+ }
+
+ void updateTexture(int width, int height)
+ {
+ tex = new Texture2D(width, height, TextureFormat.RGBA32, false);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ if (gradients_index.Count != 1)
+ {
+ int gradNum = Mathf.FloorToInt(y / 30f);
+ gradNum = Mathf.Abs(gradNum - 5) - 1;
+ if (gradNum >= gradients_index.Count)
+ {
+ tex.SetPixel(x, y, Color.white);
+ }
+ else
+ {
+ if (gradients[gradients_index[gradNum]] != null)
+ {
+ Color grad_col = gradients[gradients_index[gradNum]].Evaluate((float)x / (float)width);
+ tex.SetPixel(x, y, isLinear ? grad_col.gamma : grad_col);
+ }
+ else
+ {
+ tex.SetPixel(x, y, Color.white);
+ }
+ }
+ }
+ else
+ {
+ Color grad_col = gradients[gradients_index[0]].Evaluate((float)x / (float)width);
+ tex.SetPixel(x, y, isLinear ? grad_col.gamma : grad_col);
+ }
+ }
+ }
+ }
+
+ bool GenTexture(Texture2D tex, string path)
+ {
+ var pngData = tex.EncodeToPNG();
+ if (pngData != null)
+ {
+ File.WriteAllBytes(path, pngData);
+ AssetDatabase.Refresh();
+ return ChangeImportSettings(path);
+ }
+ return false;
+ }
+
+ bool ChangeImportSettings(string path)
+ {
+
+ string s = path.Substring(path.LastIndexOf("Assets"));
+ TextureImporter texture = (TextureImporter)TextureImporter.GetAtPath(s);
+ if (texture != null)
+ {
+ texture.wrapMode = TextureWrapMode.Clamp;
+ texture.maxTextureSize = 512;
+ texture.mipmapEnabled = false;
+ texture.textureCompression = TextureImporterCompression.Uncompressed;
+
+ // texture.sRGBTexture = !isLinear; // We already do the conversion in tex.SetPixel
+
+ texture.SaveAndReimport();
+ AssetDatabase.Refresh();
+ return true;
+
+ // shadowRamp = (Texture)Resources.Load(path);
+ // Debug.LogWarning(shadowRamp.ToString());
+ }
+ else
+ {
+ Debug.Log("Asset Path is Null, can't set to Clamped.\n You'll need to do it manually.");
+ }
+ return false;
+ }
+
+ void drawMGInputOutput()
+ {
+ GUILayout.BeginHorizontal();
+ XSMultiGradient old_xsmg = xsmg;
+ xsmg = (XSMultiGradient)EditorGUILayout.ObjectField("MultiGradient Preset", xsmg, typeof(XSMultiGradient), false, null);
+ if (xsmg != old_xsmg)
+ {
+ if (xsmg != null)
+ {
+ this.gradients = xsmg.gradients;
+ this.gradients_index = xsmg.order;
+ makeReorderedList();
+ }
+ else
+ {
+ List<Gradient> new_Grads = new List<Gradient>();
+ for (int i = 0; i < this.gradients.Count; i++)
+ {
+ new_Grads.Add(reflessGradient(this.gradients[i]));
+ }
+ this.gradients = new_Grads;
+ this.gradients_index = reflessIndexes(this.gradients_index);
+ makeReorderedList();
+ }
+ changed = true;
+ }
+
+ if (GUILayout.Button("Save New", EditorStyles.miniButton, GUILayout.ExpandWidth(false)))
+ {
+ finalFilePath = XSStyles.findAssetPath(finalFilePath);
+ string path = EditorUtility.SaveFilePanel("Save MultiGradient", (finalFilePath + "/Textures/Shadow Ramps/MGPresets"), "MultiGradient", "asset");
+ if (path.Length != 0)
+ {
+ path = path.Substring(Application.dataPath.Length - "Assets".Length);
+ XSMultiGradient _xsmg = ScriptableObject.CreateInstance<XSMultiGradient>();
+ _xsmg.uniqueName = Path.GetFileNameWithoutExtension(path);
+ foreach (Gradient grad in gradients)
+ {
+ _xsmg.gradients.Add(reflessGradient(grad));
+ }
+ _xsmg.order.AddRange(gradients_index.ToArray());
+ xsmg = _xsmg;
+ AssetDatabase.CreateAsset(_xsmg, path);
+ this.gradients = xsmg.gradients;
+ this.gradients_index = xsmg.order;
+ makeReorderedList();
+ AssetDatabase.SaveAssets();
+ }
+ }
+ GUILayout.EndHorizontal();
+ }
+
+ void drawAdvancedOptions()
+ {
+ GUILayout.BeginHorizontal();
+ isLinear = GUILayout.Toggle(isLinear, "Make Linear Texture");
+ manualMaterial = GUILayout.Toggle(manualMaterial, "Manual Material");
+ GUILayout.EndHorizontal();
+ }
+
+ void drawHelpText()
+ {
+ XSStyles.Separator();
+ dHelpText = XSStyles.ShurikenFoldout("Information", dHelpText);
+ if(dHelpText)
+ {
+ scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
+ XSStyles.HelpBox("You can use this to create a custom shadow ramp in realtime. \nIf you do not save, the ramp will be reverted back to what it was previously. \n\n - Click the Gradient box. \n - Choose resolution of the texture. \n - Save.", MessageType.Info);
+ XSStyles.HelpBox("Ramp textures support up to 5 ramps in one texture. That means you can have up to 5 ramps on a single material. You will need to author a ramp mask to choose which ramp to sample from. \n\nA texture that is fully black would sample from the bottom ramp, a texture that is fully white would sample from the top ramp, and a texture that is half gray would sample from the middle ramp. \n\n A quick tip would be that you can sample from each of the 5 ramps with 0, 0.25, 0.5, 0.75, and 1 on the texture. \n\nThe order of the gradients on the UI is the order that they will be on the texture.", MessageType.Info);
+ EditorGUILayout.EndScrollView();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSGradientEditor.cs.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSGradientEditor.cs.meta
new file mode 100644
index 00000000..93371d12
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSGradientEditor.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2f402012dc1f97241afd53cce53f8253
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSMultiGradient.cs b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSMultiGradient.cs
new file mode 100644
index 00000000..860defde
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSMultiGradient.cs
@@ -0,0 +1,9 @@
+using System.Collections.Generic;
+using UnityEngine;
+namespace XSToonDynamicPenetration {
+ public class XSMultiGradient : ScriptableObject {
+ public string uniqueName = "New Gradient";
+ public List<Gradient> gradients = new List<Gradient>();
+ public List<int> order = new List<int>();
+ }
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSMultiGradient.cs.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSMultiGradient.cs.meta
new file mode 100644
index 00000000..a17bc010
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSMultiGradient.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2ba3b19d21291594ea250616ef4fcc77
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {fileID: 2800000, guid: be9c15115645ef049adaf17bee497ab7, type: 3}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSReimportMyShadersPlease.cs b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSReimportMyShadersPlease.cs
new file mode 100644
index 00000000..1333926f
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSReimportMyShadersPlease.cs
@@ -0,0 +1,33 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using UnityEditor;
+using UnityEngine;
+namespace XSToonDynamicPenetration {
+ public class XSReimportMyShadersPlease : AssetPostprocessor {
+ private static string xsFilePath = null;
+ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) {
+ if (xsFilePath == null) {
+ xsFilePath = XSStyles.findAssetPath("");
+ }
+ foreach (string str in importedAssets) {
+ if (str.StartsWith(xsFilePath + "/Main/CGIncludes")) {
+ Debug.Log("XS CGInclude updated: " + str.Replace(xsFilePath + "/Main/CGIncludes/", ""));
+ string[] files = Directory.GetFiles(xsFilePath + "/Main/Shaders", "*.shader");
+ foreach (string file in files) {
+ AssetDatabase.ImportAsset(file, ImportAssetOptions.ForceUpdate);
+ }
+ }
+
+ if (str.StartsWith(xsFilePath + "/Main/Patreon/CGIncludes")) {
+ Debug.Log("XS CGInclude updated: " + str.Replace(xsFilePath + "/Main/Patreon/CGIncludes/", ""));
+ string[] files = Directory.GetFiles(xsFilePath + "/Main/Patreon/Shaders", "*.shader");
+ foreach (string file in files) {
+ AssetDatabase.ImportAsset(file, ImportAssetOptions.ForceUpdate);
+ }
+ }
+
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSReimportMyShadersPlease.cs.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSReimportMyShadersPlease.cs.meta
new file mode 100644
index 00000000..800bfd08
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSReimportMyShadersPlease.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2d7cac5f3a285194bb896fefb1e28bb0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSStyles.cs b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSStyles.cs
new file mode 100644
index 00000000..56cf791e
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSStyles.cs
@@ -0,0 +1,320 @@
+using System.Collections.Generic;
+using System.IO;
+using UnityEditor;
+using UnityEngine;
+namespace XSToonDynamicPenetration {
+ [InitializeOnLoad]
+ public class XSStyles : MonoBehaviour {
+ public static string ver = "2.2.4";
+
+ //Help URLs
+ public static string mainURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE/edit#bookmark=id.xh0nk8x7ws1g";
+ public static string normalsURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE/edit#bookmark=id.j7qze9btrmw8";
+ public static string shadowsURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE/edit#bookmark=id.8l0gi0hntyfs";
+ public static string rimlightURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE/edit#bookmark=id.tpxp2jrhrhxp";
+ public static string emissionsURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE/edit#bookmark=id.zc983jrwb5x4";
+ public static string specularURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE/edit#bookmark=id.gyu8l75mbtdq";
+ public static string reflURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE/edit#bookmark=id.yqzg9axi3gi";
+ public static string sssURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE/edit#bookmark=id.j2nk83f6azph";
+ public static string outlineURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE/edit#bookmark=id.jpaf9t25in8p";
+
+ public static string uiPath;
+ private static string patronpath;
+
+ public static class Styles {
+ public static GUIContent version = new GUIContent("XSToon v" + ver, "The currently installed version of XSToon.");
+ }
+
+ // Labels
+ public static void DoHeader(GUIContent HeaderText) {
+ GUILayout.Label(HeaderText, new GUIStyle(EditorStyles.boldLabel) {
+ alignment = TextAnchor.MiddleCenter,
+ wordWrap = true,
+ fontSize = 12
+ });
+ }
+
+ public static void doLabel(string text) {
+ GUILayout.Label(text, new GUIStyle(EditorStyles.label) {
+ alignment = TextAnchor.MiddleCenter,
+ wordWrap = true,
+ fontSize = 12
+ });
+ }
+
+ public static void doLabelLeft(string text) {
+ GUILayout.Label(text, new GUIStyle(EditorStyles.label) {
+ alignment = TextAnchor.MiddleLeft,
+ wordWrap = true,
+ fontSize = 12
+ });
+ }
+
+ public static void doLabelSmall(string text) {
+ GUILayout.Label(text, new GUIStyle(EditorStyles.label) {
+ alignment = TextAnchor.MiddleLeft,
+ wordWrap = true,
+ fontSize = 10
+ });
+ }
+ // ----
+
+ static public GUIStyle _LineStyle;
+ static public GUIStyle LineStyle {
+ get {
+ if (_LineStyle == null) {
+ _LineStyle = new GUIStyle();
+ _LineStyle.normal.background = EditorGUIUtility.whiteTexture;
+ _LineStyle.stretchWidth = true;
+ }
+
+ return _LineStyle;
+ }
+ }
+
+ //GUI Buttons
+ static public void callGradientEditor(Material focusedMat = null) {
+ GUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+ GUI.skin = null;
+ if (GUILayout.Button("Open Gradient Editor", GUILayout.Width(200), GUILayout.Height(20))) {
+ XSGradientEditor.focusedMat = focusedMat;
+ XSGradientEditor.Init();
+ }
+ GUILayout.FlexibleSpace();
+ GUILayout.EndHorizontal();
+ }
+
+ static public void ResetAdv(Material material) {
+ GUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+ GUI.skin = null;
+ if (GUILayout.Button("Reset ZTest / ZWrite", GUILayout.Width(200), GUILayout.Height(20))) {
+ material.SetFloat("_ZTest", 4);
+ material.SetFloat("_ZWrite", 1);
+ }
+ GUILayout.FlexibleSpace();
+ GUILayout.EndHorizontal();
+ }
+
+ static public void ResetAdvAll(Material material) {
+ GUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+ GUI.skin = null;
+ if (GUILayout.Button("Reset All Advanced", GUILayout.Width(200), GUILayout.Height(20))) {
+ material.SetFloat("_colormask", 15);
+ material.SetFloat("_Stencil", 0);
+ material.SetFloat("_StencilComp", 0);
+ material.SetFloat("_StencilOp", 0);
+ material.SetFloat("_StencilFail", 0);
+ material.SetFloat("_StencilZFail", 0);
+ material.SetFloat("_ZWrite", 1);
+ material.SetFloat("_ZTest", 4);
+ material.SetFloat("_UseUV2forNormalsSpecular", 0);
+ material.SetFloat("_RampBaseAnchor", 0.5f);
+ }
+ GUILayout.FlexibleSpace();
+ GUILayout.EndHorizontal();
+ }
+
+ static public void CallResetAdv(Material material) {
+ material.SetFloat("_colormask", 15);
+ material.SetFloat("_Stencil", 0);
+ material.SetFloat("_StencilComp", 0);
+ material.SetFloat("_StencilOp", 0);
+ material.SetFloat("_StencilFail", 0);
+ material.SetFloat("_StencilZFail", 0);
+ material.SetFloat("_ZWrite", 1);
+ material.SetFloat("_ZTest", 4);
+ material.SetFloat("_UseUV2forNormalsSpecular", 0);
+ material.SetFloat("_RampBaseAnchor", 0.5f);
+ }
+ //------
+
+ //Help Box
+ public static void HelpBox(string message, MessageType type) {
+ EditorGUILayout.HelpBox(message, type);
+ }
+
+ //GUI Lines
+ static public void Separator() {
+ GUILayout.Space(4);
+ GUILine(new Color(.3f, .3f, .3f), 1);
+ GUILine(new Color(.9f, .9f, .9f), 1);
+ GUILayout.Space(4);
+ }
+
+ static public void SeparatorThin() {
+ GUILayout.Space(2);
+ GUILine(new Color(.1f, .1f, .1f), 1f);
+ GUILine(new Color(.3f, .3f, .3f), 1f);
+ GUILayout.Space(2);
+ }
+
+ static public void SeparatorBig() {
+ GUILayout.Space(10);
+ GUILine(new Color(.3f, .3f, .3f), 2);
+ GUILayout.Space(1);
+ GUILine(new Color(.3f, .3f, .3f), 2);
+ GUILine(new Color(.85f, .85f, .85f), 1);
+ GUILayout.Space(10);
+ }
+
+ static public void GUILine(float height = 2f) {
+ GUILine(Color.black, height);
+ }
+
+ static public void GUILine(Color color, float height = 2f) {
+ Rect position = GUILayoutUtility.GetRect(0f, float.MaxValue, height, height, LineStyle);
+
+ if (Event.current.type == EventType.Repaint) {
+ Color orgColor = GUI.color;
+ GUI.color = orgColor * color;
+ LineStyle.Draw(position, false, false, false, false);
+ GUI.color = orgColor;
+ }
+ }
+ // --------------
+
+ //Help Buttons
+ public static void helpPopup(string url) //bool showBox, string title, string message, string button)
+ {
+ if (GUILayout.Button("?", "helpButton", GUILayout.Width(16), GUILayout.Height(16))) {
+ Application.OpenURL(url);
+ // showBox = true;
+ // if (showBox == true)
+ // {
+ // EditorUtility.DisplayDialog(title,
+ // message, button);
+ // }
+ }
+ }
+
+ //Find Asset Path
+ public static string findAssetPath(string finalFilePath) {
+ string[] guids1 = AssetDatabase.FindAssets("XSUpdater", null);
+ string untouchedString = AssetDatabase.GUIDToAssetPath(guids1[0]);
+ string[] splitString = untouchedString.Split('/');
+
+ ArrayUtility.RemoveAt(ref splitString, splitString.Length - 1);
+ ArrayUtility.RemoveAt(ref splitString, splitString.Length - 1);
+
+ finalFilePath = string.Join("/", splitString);
+ return finalFilePath;
+ }
+
+ //exrta buttons
+ public static void githubButton(int Width, int Height) {
+ if (GUILayout.Button("Github", GUILayout.Width(Width), GUILayout.Height(Height))) {
+ Application.OpenURL("https://github.com/Xiexe");
+ }
+ }
+
+ public static void discordButton(int Width, int Height) {
+ if (GUILayout.Button("Discord", GUILayout.Width(Width), GUILayout.Height(Height))) {
+ Application.OpenURL("https://discord.gg/3JDeUTw");
+ }
+
+ }
+
+ public static void patreonButton(int Width, int Height) {
+ if (GUILayout.Button("Patreon", GUILayout.Width(Width), GUILayout.Height(Height))) {
+ Application.OpenURL("https://www.patreon.com/xiexe");
+ }
+ }
+
+ public static void openInfoPanel(int Width, int Height) {
+ GUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+ if (GUILayout.Button("Updater | Documentation", GUILayout.Width(Width), GUILayout.Height(Height))) {
+ XSUpdater.Init();
+ }
+ GUILayout.FlexibleSpace();
+ GUILayout.EndHorizontal();
+ }
+
+ private static Rect DrawShuriken(string title, Vector2 contentOffset, int HeaderHeight) {
+ var style = new GUIStyle("ShurikenModuleTitle");
+ style.font = new GUIStyle(EditorStyles.boldLabel).font;
+ style.border = new RectOffset(15, 7, 4, 4);
+ style.fixedHeight = HeaderHeight;
+ style.contentOffset = contentOffset;
+ var rect = GUILayoutUtility.GetRect(16f, HeaderHeight, style);
+
+ GUI.Box(rect, title, style);
+ return rect;
+ }
+
+ private static Rect DrawShurikenCenteredTitle(string title, Vector2 contentOffset, int HeaderHeight) {
+ var style = new GUIStyle("ShurikenModuleTitle");
+ style.font = new GUIStyle(EditorStyles.boldLabel).font;
+ style.border = new RectOffset(15, 7, 4, 4);
+ style.fixedHeight = HeaderHeight;
+ style.contentOffset = contentOffset;
+ style.alignment = TextAnchor.MiddleCenter;
+ var rect = GUILayoutUtility.GetRect(16f, HeaderHeight, style);
+
+ GUI.Box(rect, title, style);
+ return rect;
+ }
+
+ public static bool ShurikenFoldout(string title, bool display) {
+ var rect = DrawShuriken(title, new Vector2(20f, -2f), 22);
+ var e = Event.current;
+ var toggleRect = new Rect(rect.x + 4f, rect.y + 2f, 13f, 13f);
+ if (e.type == EventType.Repaint) {
+ EditorStyles.foldout.Draw(toggleRect, false, false, display, false);
+ }
+ if (e.type == EventType.MouseDown && rect.Contains(e.mousePosition)) {
+ display = !display;
+ e.Use();
+ }
+ return display;
+ }
+
+ public static void ShurikenHeader(string title) {
+ DrawShuriken(title, new Vector2(6f, -2f), 22);
+ }
+
+ public static void ShurikenHeaderCentered(string title) {
+ DrawShurikenCenteredTitle(title, new Vector2(0f, -2f), 22);
+ }
+
+ public static void constrainedShaderProperty(MaterialEditor materialEditor, MaterialProperty prop, GUIContent style, int tabSize) {
+ EditorGUILayout.BeginHorizontal(GUILayout.MaxWidth(30));
+ materialEditor.ShaderProperty(prop, style, tabSize);
+ EditorGUILayout.EndHorizontal();
+ }
+
+ public static void DoFooter() {
+ EditorGUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+ XSStyles.discordButton(70, 30);
+ XSStyles.patreonButton(70, 30);
+ XSStyles.githubButton(70, 30);
+ GUILayout.FlexibleSpace();
+ EditorGUILayout.EndHorizontal();
+
+ XSStyles.openInfoPanel(200, 20);
+ }
+
+ public static bool HelpBoxWithButton(GUIContent messageContent, GUIContent buttonContent) {
+ const float kButtonWidth = 60f;
+ const float kSpacing = 5f;
+ const float kButtonHeight = 20f;
+
+ // Reserve size of wrapped text
+ Rect contentRect = GUILayoutUtility.GetRect(messageContent, EditorStyles.helpBox);
+ // Reserve size of button
+ GUILayoutUtility.GetRect(1, kButtonHeight + kSpacing);
+
+ // Render background box with text at full height
+ contentRect.height += kButtonHeight + kSpacing;
+ GUI.Label(contentRect, messageContent, EditorStyles.helpBox);
+
+ // Button (align lower right)
+ Rect buttonRect = new Rect(contentRect.xMax - kButtonWidth - 4f, contentRect.yMax - kButtonHeight - 4f, kButtonWidth, kButtonHeight);
+ return GUI.Button(buttonRect, buttonContent);
+ }
+ }
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSStyles.cs.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSStyles.cs.meta
new file mode 100644
index 00000000..8b78ec11
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSStyles.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6fbe6c90b2cf2fd4db4c32d7f9702612
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSTextureMerger.cs b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSTextureMerger.cs
new file mode 100644
index 00000000..afb8f04f
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSTextureMerger.cs
@@ -0,0 +1,240 @@
+//Script created by Merlin and Xiexe.
+using System.Collections;
+using System.IO;
+using UnityEditor;
+using UnityEngine;
+namespace XSToonDynamicPenetration {
+ public class XSTextureMerger : EditorWindow {
+
+ private enum resolutions {
+ Tiny_256x256,
+ Small_512x512,
+ Medium_1024x1024,
+ Large_2048x2048,
+ VeryLarge_4096x4096,
+ Why_8192x8192
+ }
+
+ private enum EChannels {
+ None,
+ Red,
+ Green,
+ Blue,
+ Alpha
+ }
+
+ private enum ETextures {
+ None,
+ Tex1,
+ Tex2,
+ Tex3,
+ Tex4
+ }
+
+ private Texture2D[] textures = new Texture2D[4];
+ private EChannels[] texChannels = new EChannels[4];
+ private ETextures[] pickTexture = new ETextures[4];
+ private bool[] invertChannel = new bool[4];
+
+ private static int srcTex;
+ private resolutions res;
+ private Vector2 scrollPos;
+ private static int resolution;
+ private static string finalFilePath;
+ private static Color outColor;
+ private static Color[] texColors = new Color[4];
+
+ private static float progress;
+ [MenuItem("Tools/Xiexe/XSToon/Texture Merger")]
+ static public void Init() {
+ XSTextureMerger window = EditorWindow.GetWindow<XSTextureMerger>(false, "XSToon: Texture Merger", true);
+ window.minSize = new Vector2(500, 300);
+ window.maxSize = new Vector2(500, 500);
+ }
+
+ public void OnGUI() {
+ scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(105);
+ XSStyles.doLabel("1");
+ GUILayout.Space(105);
+ XSStyles.doLabel("2");
+ GUILayout.Space(105);
+ XSStyles.doLabel("3");
+ GUILayout.Space(105);
+ XSStyles.doLabel("4");
+ GUILayout.EndHorizontal();
+
+ XSStyles.SeparatorThin();
+ GUILayout.BeginHorizontal();
+ for (int i = 0; i < 4; i++) {
+ EditorGUIUtility.labelWidth = 0.01f;
+ textures[i] = (Texture2D) EditorGUILayout.ObjectField(new GUIContent("", ""), textures[i], typeof(Texture2D), true);
+
+ }
+ GUILayout.EndHorizontal();
+
+ float oldLabelWidth = EditorGUIUtility.labelWidth;
+ EditorGUIUtility.labelWidth = 40;
+ GUIStyle headerStyle = EditorStyles.boldLabel;
+ headerStyle.alignment = TextAnchor.UpperLeft;
+ headerStyle.fontStyle = FontStyle.Bold;
+ headerStyle.stretchWidth = true;
+
+ XSStyles.SeparatorThin();
+ EditorGUILayout.BeginHorizontal();
+ GUILayout.Label("Output Channel:", headerStyle);
+
+ GUILayout.Label("R", headerStyle);
+ GUILayout.Label("G", headerStyle);
+ GUILayout.Label("B", headerStyle);
+ GUILayout.Label("A", headerStyle);
+ EditorGUILayout.EndHorizontal();
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Label("Src Texture:");
+ GUILayout.Space(20);
+ for (int i = 0; i < 4; i++) {
+ pickTexture[i] = (ETextures) EditorGUILayout.EnumPopup("", pickTexture[i]);
+ }
+ GUILayout.EndHorizontal();
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Label("Src Channel:");
+ GUILayout.Space(17);
+ for (int i = 0; i < 4; i++) {
+ texChannels[i] = (EChannels) EditorGUILayout.EnumPopup("", texChannels[i]);
+ }
+ GUILayout.EndHorizontal();
+ GUILayout.BeginHorizontal();
+ GUILayout.Label("Invert Channel:");
+ for (int i = 0; i < 4; i++) {
+ invertChannel[i] = EditorGUILayout.Toggle("", invertChannel[i]);
+ }
+ GUILayout.EndHorizontal();
+
+ GUILayout.Space(20);
+ EditorGUILayout.EndScrollView();
+
+ //Button and Resolution
+ GUILayout.BeginVertical();
+ XSStyles.doLabel("Resolution");
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(175);
+ res = (resolutions) EditorGUILayout.EnumPopup("", res);
+ GUILayout.Space(175);
+ GUILayout.EndHorizontal();
+
+ if (GUILayout.Button("Merge Channels")) {
+ if (progress < 2) {
+ EditorUtility.DisplayProgressBar("XSToon Texture Merger", "Merging and compressing new texture...", (float) (progress / 2));
+ }
+
+ //Set target textures to be ReadWriteable
+
+ for (int i = 0; i < textures.Length; i++) {
+ if (textures[i] == null)
+ break;
+
+ string texturePath = AssetDatabase.GetAssetPath(textures[i]);
+ TextureImporter texture = (TextureImporter) TextureImporter.GetAtPath(texturePath);
+ if (texture != null) {
+ texture.isReadable = true;
+ texture.SaveAndReimport();
+ }
+ }
+
+ switch (res) {
+ case resolutions.Tiny_256x256:
+ resolution = 256;
+ break;
+
+ case resolutions.Small_512x512:
+ resolution = 512;
+ break;
+
+ case resolutions.Medium_1024x1024:
+ resolution = 1024;
+ break;
+
+ case resolutions.Large_2048x2048:
+ resolution = 2048;
+ break;
+
+ case resolutions.VeryLarge_4096x4096:
+ resolution = 4096;
+ break;
+
+ case resolutions.Why_8192x8192:
+ resolution = 8192;
+ break;
+ }
+
+ XSStyles.findAssetPath(finalFilePath);
+ finalFilePath = EditorUtility.SaveFilePanel("Save Merged Texture", finalFilePath + "/Textures/", "mergedTex.png", "png");
+
+ Texture2D newTexture = new Texture2D(resolution, resolution, TextureFormat.RGBA32, false);
+
+ //Get Colors textures and write them to the proper channel
+
+ for (int y = 0; y < resolution; y++) {
+ for (int x = 0; x < resolution; x++) {
+ float u = x / (float) resolution;
+ float v = y / (float) resolution;
+
+ // Grab out the texture values into an array for later lookup. Could probably just be done at the moment the texture color is needed.
+ for (int i = 0; i < textures.Length; i++) {
+ if (textures[i] != null) {
+ texColors[i] = textures[i].GetPixelBilinear(u, v);
+ } else {
+ texColors[i] = new Color(0, 0, 0, 1);
+ }
+ }
+
+ Color outputColor = new Color(0, 0, 0, 1);
+
+ // Iterate the output RGBA channels
+ for (int i = 0; i < 4; i++) {
+ // Convert the enums to indices we can use. 'None' will turn into -1 which will be discarded as invalid.
+ int srcTexIdx = ((int) pickTexture[i]) - 1;
+ int srcChannelIdx = ((int) texChannels[i]) - 1;
+
+ // Go through each channel in the output color and assign it
+ if (srcTexIdx >= 0 && srcChannelIdx >= 0) {
+ outputColor[i] = texColors[srcTexIdx][srcChannelIdx];
+
+ //Allow you to invert specific channels.
+ if (invertChannel[i]) {
+ outputColor[i] = 1f - outputColor[i];
+ }
+ }
+ }
+
+ newTexture.SetPixel(x, y, outputColor);
+ }
+ }
+ progress += 1;
+ newTexture.Apply();
+ ExportTexture(newTexture);
+ }
+
+ GUILayout.Space(10);
+ GUILayout.EndVertical();
+
+ EditorGUIUtility.labelWidth = oldLabelWidth;
+ }
+
+ private static void ExportTexture(Texture2D newTexture) {
+ var pngData = newTexture.EncodeToPNG();
+
+ if (pngData != null) {
+ File.WriteAllBytes(finalFilePath, pngData);
+ AssetDatabase.Refresh();
+ }
+ progress += 1;
+ EditorUtility.ClearProgressBar();
+ }
+ }
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSTextureMerger.cs.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSTextureMerger.cs.meta
new file mode 100644
index 00000000..e08441a9
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSTextureMerger.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c8ee9dec630580044a70e2ebf30730db
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSToonInspector.cs b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSToonInspector.cs
new file mode 100644
index 00000000..108fffce
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSToonInspector.cs
@@ -0,0 +1,734 @@
+using UnityEditor;
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System;
+using System.Reflection;
+
+namespace XSToonDynamicPenetration
+{
+ public class XSToonInspector : ShaderGUI
+ {
+ BindingFlags bindingFlags = BindingFlags.Public |
+ BindingFlags.NonPublic |
+ BindingFlags.Instance |
+ BindingFlags.Static;
+
+ //Assign all properties as null at first to stop hundreds of warnings spamming the log when script gets compiled.
+ //If they aren't we get warnings, because assigning with reflection seems to make Unity think that the properties never actually get used.
+ private MaterialProperty _VertexColorAlbedo = null;
+ private MaterialProperty _TilingMode = null;
+ private MaterialProperty _Culling = null;
+ private MaterialProperty _BlendMode = null;
+ private MaterialProperty _MainTex = null;
+ private MaterialProperty _HSVMask = null;
+ private MaterialProperty _Saturation = null;
+ private MaterialProperty _Hue = null;
+ private MaterialProperty _Value = null;
+ private MaterialProperty _Color = null;
+ private MaterialProperty _Cutoff = null;
+ private MaterialProperty _FadeDither = null;
+ private MaterialProperty _FadeDitherDistance = null;
+ private MaterialProperty _BumpMap = null;
+ private MaterialProperty _BumpScale = null;
+ private MaterialProperty _DetailNormalMap = null;
+ private MaterialProperty _DetailMask = null;
+ private MaterialProperty _DetailNormalMapScale = null;
+ private MaterialProperty _ReflectionMode = null;
+ private MaterialProperty _ReflectionBlendMode = null;
+ private MaterialProperty _MetallicGlossMap = null;
+ private MaterialProperty _BakedCubemap = null;
+ private MaterialProperty _Matcap = null;
+ private MaterialProperty _MatcapTintToDiffuse = null;
+ private MaterialProperty _MatcapTint = null;
+ private MaterialProperty _ReflectivityMask = null;
+ private MaterialProperty _Metallic = null;
+ private MaterialProperty _Glossiness = null;
+ private MaterialProperty _Reflectivity = null;
+ private MaterialProperty _ClearCoat = null;
+ private MaterialProperty _ClearcoatStrength = null;
+ private MaterialProperty _ClearcoatSmoothness = null;
+ private MaterialProperty _EmissionMap = null;
+ private MaterialProperty _ScaleWithLight = null;
+ private MaterialProperty _ScaleWithLightSensitivity = null;
+ private MaterialProperty _EmissionColor = null;
+ private MaterialProperty _EmissionToDiffuse = null;
+ private MaterialProperty _RimColor = null;
+ private MaterialProperty _RimIntensity = null;
+ private MaterialProperty _RimRange = null;
+ private MaterialProperty _RimThreshold = null;
+ private MaterialProperty _RimSharpness = null;
+ private MaterialProperty _RimAlbedoTint = null;
+ private MaterialProperty _RimCubemapTint = null;
+ private MaterialProperty _RimAttenEffect = null;
+ private MaterialProperty _SpecularSharpness = null;
+ private MaterialProperty _SpecularMap = null;
+ private MaterialProperty _SpecularIntensity = null;
+ private MaterialProperty _SpecularArea = null;
+ private MaterialProperty _AnisotropicSpecular = null;
+ private MaterialProperty _AnisotropicReflection = null;
+ private MaterialProperty _SpecularAlbedoTint = null;
+ private MaterialProperty _RampSelectionMask = null;
+ private MaterialProperty _Ramp = null;
+ private MaterialProperty _ShadowRim = null;
+ private MaterialProperty _ShadowRimRange = null;
+ private MaterialProperty _ShadowRimThreshold = null;
+ private MaterialProperty _ShadowRimSharpness = null;
+ private MaterialProperty _ShadowRimAlbedoTint = null;
+ private MaterialProperty _OcclusionMap = null;
+ private MaterialProperty _OcclusionIntensity = null;
+ private MaterialProperty _OcclusionMode = null;
+ private MaterialProperty _ThicknessMap = null;
+ private MaterialProperty _SSColor = null;
+ private MaterialProperty _SSDistortion = null;
+ private MaterialProperty _SSPower = null;
+ private MaterialProperty _SSScale = null;
+ private MaterialProperty _HalftoneDotSize = null;
+ private MaterialProperty _HalftoneDotAmount = null;
+ private MaterialProperty _HalftoneLineAmount = null;
+ private MaterialProperty _HalftoneLineIntensity = null;
+ private MaterialProperty _HalftoneType = null;
+ private MaterialProperty _UVSetAlbedo = null;
+ private MaterialProperty _UVSetNormal = null;
+ private MaterialProperty _UVSetDetNormal = null;
+ private MaterialProperty _UVSetDetMask = null;
+ private MaterialProperty _UVSetMetallic = null;
+ private MaterialProperty _UVSetSpecular = null;
+ private MaterialProperty _UVSetReflectivity = null;
+ private MaterialProperty _UVSetThickness = null;
+ private MaterialProperty _UVSetOcclusion = null;
+ private MaterialProperty _UVSetEmission = null;
+ private MaterialProperty _UVSetClipMap = null;
+ private MaterialProperty _UVSetDissolve = null;
+ private MaterialProperty _Stencil = null;
+ private MaterialProperty _StencilComp = null;
+ private MaterialProperty _StencilOp = null;
+ private MaterialProperty _OutlineAlbedoTint = null;
+ private MaterialProperty _OutlineLighting = null;
+ private MaterialProperty _OutlineMask = null;
+ private MaterialProperty _OutlineWidth = null;
+ private MaterialProperty _OutlineColor = null;
+ private MaterialProperty _OutlineNormalMode = null;
+ private MaterialProperty _OutlineUVSelect = null;
+ private MaterialProperty _ShadowSharpness = null;
+ private MaterialProperty _AdvMode = null;
+ private MaterialProperty _ClipMap = null;
+ private MaterialProperty _ClipAgainstVertexColorGreaterZeroFive = null;
+ private MaterialProperty _ClipAgainstVertexColorLessZeroFive = null;
+ private MaterialProperty _IOR = null;
+ private MaterialProperty _UseRefraction = null;
+ private MaterialProperty _RefractionModel = null;
+ private MaterialProperty _NormalMapMode = null;
+ private MaterialProperty _DissolveCoordinates = null;
+ private MaterialProperty _DissolveTexture = null;
+ private MaterialProperty _DissolveStrength = null;
+ private MaterialProperty _DissolveColor = null;
+ private MaterialProperty _DissolveProgress = null;
+ private MaterialProperty _UseClipsForDissolve = null;
+
+ //Material Properties for Dynamic Penetration System
+ private MaterialProperty _Squeeze = null;
+ private MaterialProperty _SqueezeDist = null;
+ private MaterialProperty _BulgeOffset = null;
+ private MaterialProperty _BulgePower = null;
+ private MaterialProperty _Length = null;
+ private MaterialProperty _EntranceStiffness = null;
+ private MaterialProperty _Curvature = null;
+ private MaterialProperty _ReCurvature = null;
+ private MaterialProperty _WriggleSpeed = null;
+ private MaterialProperty _Wriggle = null;
+ private MaterialProperty _OrificeChannel = null;
+ private MaterialProperty _OrificeData = null;
+ private MaterialProperty _EntryOpenDuration = null;
+ private MaterialProperty _Shape1Depth = null;
+ private MaterialProperty _Shape1Duration = null;
+ private MaterialProperty _Shape2Depth = null;
+ private MaterialProperty _Shape2Duration = null;
+ private MaterialProperty _Shape3Depth = null;
+ private MaterialProperty _Shape3Duration = null;
+ private MaterialProperty _BlendshapePower = null;
+ private MaterialProperty _BlendshapeBadScaleFix = null;
+
+ //--
+
+ //Material Properties for Patreon Plugins
+ private MaterialProperty _LeftRightPan = null;
+ private MaterialProperty _UpDownPan = null;
+ private MaterialProperty _Twitchyness = null;
+ private MaterialProperty _AttentionSpan = null;
+ private MaterialProperty _FollowPower = null;
+ private MaterialProperty _FollowLimit = null;
+ private MaterialProperty _LookSpeed = null;
+ private MaterialProperty _IrisSize = null;
+ private MaterialProperty _EyeOffsetLimit = null;
+ //--
+
+ private static bool showMainSettings = true;
+ private static bool showNormalMapSettings = false;
+ private static bool showShadows = true;
+ private static bool showSpecular = false;
+ private static bool showReflection = false;
+ private static bool showRimlight = false;
+ private static bool showHalftones = false;
+ private static bool showSubsurface = false;
+ private static bool showOutlines = false;
+ private static bool showEmission = false;
+ private static bool showAdvanced = false;
+ private static bool showEyeTracking = false;
+ private static bool showRefractionSettings = false;
+ private static bool showDissolveSettings = false;
+ private static bool showPenetrator = true;
+
+ private bool isPatreonShader = false;
+ private bool isEyeTracking = false;
+ private bool isOutlined = false;
+ private bool isCutout = false;
+ private bool isCutoutMasked = false;
+ private bool isDithered = false;
+ private bool isRefractive = false;
+ private bool isPenetratorShader = false;
+ private bool isOrificeShader = false;
+
+ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props)
+ {
+ Material material = materialEditor.target as Material;
+ Shader shader = material.shader;
+
+ isCutout = material.GetInt("_BlendMode") == 1;
+ isDithered = material.GetInt("_BlendMode") == 2;
+ isRefractive = material.GetInt("_UseRefraction") == 1;
+ isOutlined = shader.name.Contains("Outline");
+ isPatreonShader = shader.name.Contains("Patreon");
+ isEyeTracking = shader.name.Contains("EyeTracking");
+ isPenetratorShader = shader.name.Contains("Penetrator");
+ isOrificeShader = shader.name.Contains("Orifice");
+
+ //Find all material properties listed in the script using reflection, and set them using a loop only if they're of type MaterialProperty.
+ //This makes things a lot nicer to maintain and cleaner to look at.
+ foreach (var property in GetType().GetFields(bindingFlags))
+ {
+ if (property.FieldType == typeof(MaterialProperty))
+ {
+ try { property.SetValue(this, FindProperty(property.Name, props)); } catch { /*Is it really a problem if it doesn't exist?*/ }
+ }
+ }
+
+ EditorGUI.BeginChangeCheck();
+ {
+ XSStyles.ShurikenHeaderCentered("XSToon v" + XSStyles.ver);
+ material.SetShaderPassEnabled("Always", isRefractive);
+ materialEditor.ShaderProperty(_AdvMode, new GUIContent("Shader Mode", "Setting this to 'Advanced' will give you access to things such as stenciling, and other expiremental/advanced features."));
+ materialEditor.ShaderProperty(_Culling, new GUIContent("Culling Mode", "Changes the culling mode. 'Off' will result in a two sided material, while 'Front' and 'Back' will cull those sides respectively"));
+ materialEditor.ShaderProperty(_TilingMode, new GUIContent("Tiling Mode", "Setting this to Merged will tile and offset all textures based on the Main texture's Tiling/Offset."));
+ materialEditor.ShaderProperty(_BlendMode, new GUIContent("Blend Mode", "Blend mode of the material. (Opaque, transparent, cutout, etc.)"));
+ materialEditor.ShaderProperty(_UseRefraction, new GUIContent("Refraction", "Should this material be refractive? (Warning, this can be expensive!)"));
+
+ DoBlendModeSettings(material);
+ DrawPenetratorSettings(materialEditor);
+ DrawOrificeSettings(materialEditor);
+ DrawMainSettings(materialEditor);
+ DrawDissolveSettings(materialEditor);
+ DrawShadowSettings(materialEditor, material);
+ DrawOutlineSettings(materialEditor);
+ DrawNormalSettings(materialEditor);
+ DrawSpecularSettings(materialEditor);
+ DrawReflectionsSettings(materialEditor, material);
+ DrawRefractionSettings(materialEditor);
+ DrawEmissionSettings(materialEditor);
+ DrawRimlightSettings(materialEditor);
+ DrawHalfToneSettings(materialEditor);
+ DrawTransmissionSettings(materialEditor);
+ DrawAdvancedSettings(materialEditor);
+ DrawPatreonSettings(materialEditor);
+ XSStyles.DoFooter();
+ }
+ }
+
+ private void DoBlendModeSettings(Material material)
+ {
+ int mode = material.GetInt("_BlendMode");
+ switch (mode)
+ {
+ case 0: //Opaque
+ SetBlend(material, (int)UnityEngine.Rendering.BlendMode.One, (int)UnityEngine.Rendering.BlendMode.Zero, (int)UnityEngine.Rendering.RenderQueue.Geometry, 1, 0);
+ material.DisableKeyword("_ALPHABLEND_ON");
+ material.DisableKeyword("_ALPHATEST_ON");
+ break;
+
+ case 1: //Cutout
+ SetBlend(material, (int)UnityEngine.Rendering.BlendMode.One, (int)UnityEngine.Rendering.BlendMode.Zero, (int)UnityEngine.Rendering.RenderQueue.AlphaTest, 1, 0);
+ material.DisableKeyword("_ALPHABLEND_ON");
+ material.EnableKeyword("_ALPHATEST_ON");
+ break;
+
+ case 2: //Dithered
+ SetBlend(material, (int)UnityEngine.Rendering.BlendMode.One, (int)UnityEngine.Rendering.BlendMode.Zero, (int)UnityEngine.Rendering.RenderQueue.AlphaTest, 1, 0);
+ material.DisableKeyword("_ALPHABLEND_ON");
+ material.EnableKeyword("_ALPHATEST_ON");
+ break;
+
+ case 3: //Alpha To Coverage
+ SetBlend(material, (int)UnityEngine.Rendering.BlendMode.One, (int)UnityEngine.Rendering.BlendMode.Zero, (int)UnityEngine.Rendering.RenderQueue.AlphaTest, 1, 1);
+ material.DisableKeyword("_ALPHABLEND_ON");
+ material.EnableKeyword("_ALPHATEST_ON");
+ break;
+
+ case 4: //Transparent
+ SetBlend(material, (int)UnityEngine.Rendering.BlendMode.One, (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha, (int)UnityEngine.Rendering.RenderQueue.Transparent, 0, 0);
+ material.EnableKeyword("_ALPHABLEND_ON");
+ material.DisableKeyword("_ALPHATEST_ON");
+ break;
+
+ case 5: //Fade
+ SetBlend(material, (int)UnityEngine.Rendering.BlendMode.SrcAlpha, (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha, (int)UnityEngine.Rendering.RenderQueue.Transparent, 0, 0);
+ material.EnableKeyword("_ALPHABLEND_ON");
+ material.DisableKeyword("_ALPHATEST_ON");
+ break;
+
+ case 6: //Additive
+ SetBlend(material, (int)UnityEngine.Rendering.BlendMode.One, (int)UnityEngine.Rendering.BlendMode.One, (int)UnityEngine.Rendering.RenderQueue.Transparent, 0, 0);
+ material.DisableKeyword("_ALPHABLEND_ON");
+ material.DisableKeyword("_ALPHATEST_ON");
+ break;
+ }
+ }
+
+ private void SetBlend(Material material, int src, int dst, int renderQueue, int zwrite, int alphatocoverage)
+ {
+ material.SetInt("_SrcBlend", src);
+ material.SetInt("_DstBlend", dst);
+ material.SetInt("_ZWrite", zwrite);
+ material.SetInt("_AlphaToCoverage", alphatocoverage);
+
+ material.renderQueue = isRefractive ? (int)UnityEngine.Rendering.RenderQueue.Overlay - 1 : renderQueue;
+ }
+
+ private void DrawMainSettings(MaterialEditor materialEditor)
+ {
+ showMainSettings = XSStyles.ShurikenFoldout("Main Settings", showMainSettings);
+ if (showMainSettings)
+ {
+ materialEditor.TexturePropertySingleLine(new GUIContent("Main Texture", "The main Albedo texture."), _MainTex, _Color);
+ if (isCutout)
+ {
+ materialEditor.ShaderProperty(_Cutoff, new GUIContent("Cutoff", "The Cutoff Amount"), 2);
+ }
+ materialEditor.ShaderProperty(_UVSetAlbedo, new GUIContent("UV Set", "The UV set to use for the Albedo Texture."), 2);
+ materialEditor.TextureScaleOffsetProperty(_MainTex);
+
+ materialEditor.TexturePropertySingleLine(new GUIContent("HSV Mask", "RGB Mask: R = Hue, G = Saturation, B = Brightness"), _HSVMask);
+ materialEditor.ShaderProperty(_Hue, new GUIContent("Hue", "Controls Hue of the final output from the shader."));
+ materialEditor.ShaderProperty(_Saturation, new GUIContent("Saturation", "Controls saturation of the final output from the shader."));
+ materialEditor.ShaderProperty(_Value, new GUIContent("Brightness", "Controls value of the final output from the shader."));
+
+ if (isDithered)
+ {
+ XSStyles.SeparatorThin();
+ materialEditor.ShaderProperty(_FadeDither, new GUIContent("Distance Fading", "Make the shader dither out based on the distance to the camera."));
+ materialEditor.ShaderProperty(_FadeDitherDistance, new GUIContent("Fade Threshold", "The distance at which the fading starts happening."));
+ }
+ }
+ }
+
+ private void DrawDissolveSettings(MaterialEditor materialEditor)
+ {
+ if (isCutout || isDithered)
+ {
+ showDissolveSettings = XSStyles.ShurikenFoldout("Dissolve", showDissolveSettings);
+ if (showDissolveSettings)
+ {
+ materialEditor.ShaderProperty(_DissolveCoordinates, new GUIContent("Dissolve Coordinates", "Should Dissolve happen in world space, texture space, or vertically?"));
+ materialEditor.TexturePropertySingleLine(new GUIContent("Dissolve Texture", "Noise texture used to control up dissolve pattern"), _DissolveTexture, _DissolveColor);
+ materialEditor.TextureScaleOffsetProperty(_DissolveTexture);
+ materialEditor.ShaderProperty(_UVSetDissolve, new GUIContent("UV Set", "The UV set to use for the Dissolve Texture."), 2);
+
+ materialEditor.ShaderProperty(_DissolveStrength, new GUIContent("Dissolve Sharpness", "Sharpness of the dissolve texture."));
+ materialEditor.ShaderProperty(_DissolveProgress, new GUIContent("Dissolve Progress", "Progress of the dissolve effect."));
+ }
+ }
+ }
+
+ private void DrawShadowSettings(MaterialEditor materialEditor, Material material)
+ {
+ showShadows = XSStyles.ShurikenFoldout("Shadows", showShadows);
+ if (showShadows)
+ {
+ materialEditor.TexturePropertySingleLine(new GUIContent("Ramp Selection Mask", "A black to white mask that determins how far up on the multi ramp to sample. 0 for bottom, 1 for top, 0.5 for middle, 0.25, and 0.75 for mid bottom and mid top respectively."), _RampSelectionMask);
+
+ XSStyles.SeparatorThin();
+ if (_RampSelectionMask.textureValue != null)
+ {
+ string rampMaskPath = AssetDatabase.GetAssetPath(_RampSelectionMask.textureValue);
+ TextureImporter ti = (TextureImporter)TextureImporter.GetAtPath(rampMaskPath);
+ if (ti.sRGBTexture)
+ {
+ if (XSStyles.HelpBoxWithButton(new GUIContent("This texture is not marked as Linear.", "This is recommended for the mask"), new GUIContent("Fix Now")))
+ {
+ ti.sRGBTexture = false;
+ AssetDatabase.ImportAsset(rampMaskPath, ImportAssetOptions.ForceUpdate);
+ AssetDatabase.Refresh();
+ }
+ }
+ }
+
+ materialEditor.TexturePropertySingleLine(new GUIContent("Shadow Ramp", "Shadow Ramp, Dark to Light should be Left to Right"), _Ramp);
+ materialEditor.ShaderProperty(_ShadowSharpness, new GUIContent("Shadow Sharpness", "Controls the sharpness of recieved shadows, as well as the sharpness of 'shadows' from Vertex Lighting."));
+
+ XSStyles.SeparatorThin();
+ materialEditor.ShaderProperty(_OcclusionMode, new GUIContent("Occlusion Mode", "How to calculate the occlusion map contribution"));
+ materialEditor.TexturePropertySingleLine(new GUIContent("Occlusion Map", "Occlusion Map, used to darken areas on the model artifically."), _OcclusionMap);
+ materialEditor.ShaderProperty(_OcclusionIntensity, new GUIContent("Intensity", "Occlusion intensity"), 2);
+ materialEditor.ShaderProperty(_UVSetOcclusion, new GUIContent("UV Set", "The UV set to use for the Occlusion Texture"), 2);
+ materialEditor.TextureScaleOffsetProperty(_OcclusionMap);
+
+ XSStyles.SeparatorThin();
+ XSStyles.constrainedShaderProperty(materialEditor, _ShadowRim, new GUIContent("Shadow Rim", "Shadow Rim Color. Set to white to disable."), 0);
+ materialEditor.ShaderProperty(_ShadowRimAlbedoTint, new GUIContent("Shadow Rim Albedo Tint", "How much the Albedo texture should effect the Shadow Rim color."));
+ materialEditor.ShaderProperty(_ShadowRimRange, new GUIContent("Range", "Range of the Shadow Rim"), 2);
+ materialEditor.ShaderProperty(_ShadowRimThreshold, new GUIContent("Threshold", "Threshold of the Shadow Rim"), 2);
+ materialEditor.ShaderProperty(_ShadowRimSharpness, new GUIContent("Sharpness", "Sharpness of the Shadow Rim"), 2);
+ XSStyles.callGradientEditor(material);
+ }
+ }
+
+ private void DrawOutlineSettings(MaterialEditor materialEditor)
+ {
+ if (isOutlined)
+ {
+ showOutlines = XSStyles.ShurikenFoldout("Outlines", showOutlines);
+ if (showOutlines)
+ {
+ materialEditor.ShaderProperty(_OutlineNormalMode, new GUIContent("Outline Normal Mode", "How to calcuate the outline expand direction. Using mesh normals may result in split edges."));
+
+ if (_OutlineNormalMode.floatValue == 2)
+ materialEditor.ShaderProperty(_OutlineUVSelect, new GUIContent("Normals UV", "UV Channel to pull the modified normals from for outlines."));
+
+ materialEditor.ShaderProperty(_OutlineLighting, new GUIContent("Outline Lighting", "Makes outlines respect the lighting, or be emissive."));
+ materialEditor.ShaderProperty(_OutlineAlbedoTint, new GUIContent("Outline Albedo Tint", "Includes the color of the Albedo Texture in the calculation for the color of the outline."));
+ materialEditor.TexturePropertySingleLine(new GUIContent("Outline Mask", "Outline width mask, black will make the outline minimum width."), _OutlineMask);
+ materialEditor.ShaderProperty(_OutlineWidth, new GUIContent("Outline Width", "Width of the Outlines"));
+ XSStyles.constrainedShaderProperty(materialEditor, _OutlineColor, new GUIContent("Outline Color", "Color of the outlines"), 0);
+ }
+ }
+ }
+
+ private void DrawNormalSettings(MaterialEditor materialEditor)
+ {
+ showNormalMapSettings = XSStyles.ShurikenFoldout("Normal Maps", showNormalMapSettings);
+ if (showNormalMapSettings)
+ {
+ materialEditor.ShaderProperty(_NormalMapMode, new GUIContent("Normal Map Source", "How to alter the normals of the mesh, using which source?"));
+ if (_NormalMapMode.floatValue == 0)
+ {
+ materialEditor.TexturePropertySingleLine(new GUIContent("Normal Map", "Normal Map"), _BumpMap);
+ materialEditor.ShaderProperty(_BumpScale, new GUIContent("Normal Strength", "Strength of the main Normal Map"), 2);
+ materialEditor.ShaderProperty(_UVSetNormal, new GUIContent("UV Set", "The UV set to use for the Normal Map"), 2);
+ materialEditor.TextureScaleOffsetProperty(_BumpMap);
+
+ XSStyles.SeparatorThin();
+ materialEditor.TexturePropertySingleLine(new GUIContent("Detail Normal Map", "Detail Normal Map"), _DetailNormalMap);
+ materialEditor.ShaderProperty(_DetailNormalMapScale, new GUIContent("Detail Normal Strength", "Strength of the detail Normal Map"), 2);
+ materialEditor.ShaderProperty(_UVSetDetNormal, new GUIContent("UV Set", "The UV set to use for the Detail Normal Map"), 2);
+ materialEditor.TextureScaleOffsetProperty(_DetailNormalMap);
+
+ XSStyles.SeparatorThin();
+ materialEditor.TexturePropertySingleLine(new GUIContent("Detail Mask", "Mask for Detail Maps"), _DetailMask);
+ materialEditor.ShaderProperty(_UVSetDetMask, new GUIContent("UV Set", "The UV set to use for the Detail Mask"), 2);
+ materialEditor.TextureScaleOffsetProperty(_DetailMask);
+ }
+ }
+ }
+
+ private void DrawSpecularSettings(MaterialEditor materialEditor)
+ {
+ showSpecular = XSStyles.ShurikenFoldout("Specular", showSpecular);
+ if (showSpecular)
+ {
+ XSStyles.SeparatorThin();
+
+ materialEditor.TexturePropertySingleLine(new GUIContent("Specular Map(R,G,B)", "Specular Map. Red channel controls Intensity, Green controls how much specular is tinted by Albedo, and Blue controls Smoothness (Only for Blinn-Phong, and GGX)."), _SpecularMap);
+ materialEditor.TextureScaleOffsetProperty(_SpecularMap);
+ materialEditor.ShaderProperty(_UVSetSpecular, new GUIContent("UV Set", "The UV set to use for the Specular Map"), 2);
+ materialEditor.ShaderProperty(_SpecularIntensity, new GUIContent("Intensity", "Specular Intensity."), 2);
+ materialEditor.ShaderProperty(_SpecularArea, new GUIContent("Roughness", "Roughness"), 2);
+ materialEditor.ShaderProperty(_SpecularAlbedoTint, new GUIContent("Albedo Tint", "How much the specular highlight should derive color from the albedo of the object."), 2);
+ materialEditor.ShaderProperty(_SpecularSharpness, new GUIContent("Sharpness", "How hard of and edge transitions should the specular have?"), 2);
+ materialEditor.ShaderProperty(_AnisotropicSpecular, new GUIContent("Anisotropy", "The amount of anisotropy the surface has - this will stretch the reflection along an axis (think bottom of a frying pan)"), 2);
+ }
+ }
+
+ private void DrawReflectionsSettings(MaterialEditor materialEditor, Material material)
+ {
+ showReflection = XSStyles.ShurikenFoldout("Reflections", showReflection);
+ if (showReflection)
+ {
+ materialEditor.ShaderProperty(_ReflectionMode, new GUIContent("Reflection Mode", "Reflection Mode."));
+
+ if (_ReflectionMode.floatValue == 0) // PBR
+ {
+ materialEditor.ShaderProperty(_ReflectionBlendMode, new GUIContent("Reflection Blend Mode", "Blend mode for reflection. Additive is Color + reflection, Multiply is Color * reflection, and subtractive is Color - reflection"));
+ materialEditor.ShaderProperty(_ClearCoat, new GUIContent("Clearcoat", "Clearcoat"));
+
+ XSStyles.SeparatorThin();
+ materialEditor.TexturePropertySingleLine(new GUIContent("Fallback Cubemap", " Used as fallback in 'Unity' reflection mode if reflection probe is black."), _BakedCubemap);
+
+ XSStyles.SeparatorThin();
+ materialEditor.TexturePropertySingleLine(new GUIContent("Metallic Map", "Metallic Map, Metallic on Red Channel, Smoothness on Alpha Channel. \nIf Clearcoat is enabled, Clearcoat Smoothness on Green Channel, Clearcoat Reflectivity on Blue Channel."), _MetallicGlossMap);
+ materialEditor.TextureScaleOffsetProperty(_MetallicGlossMap);
+ materialEditor.ShaderProperty(_UVSetMetallic, new GUIContent("UV Set", "The UV set to use for the Metallic Smoothness Map"), 2);
+ materialEditor.ShaderProperty(_AnisotropicReflection, new GUIContent("Anisotropy", "The amount of anisotropy the surface has - this will stretch the reflection along an axis (think bottom of a frying pan)"), 2);
+ materialEditor.ShaderProperty(_Metallic, new GUIContent("Metallic", "Metallic, set to 1 if using metallic map"), 2);
+ materialEditor.ShaderProperty(_Glossiness, new GUIContent("Smoothness", "Smoothness, set to 1 if using metallic map"), 2);
+ materialEditor.ShaderProperty(_ClearcoatSmoothness, new GUIContent("Clearcoat Smoothness", "Smoothness of the clearcoat."), 2);
+ materialEditor.ShaderProperty(_ClearcoatStrength, new GUIContent("Clearcoat Reflectivity", "The strength of the clearcoat reflection."), 2);
+ }
+ else if (_ReflectionMode.floatValue == 1) //Baked cube
+ {
+ materialEditor.ShaderProperty(_ReflectionBlendMode, new GUIContent("Reflection Blend Mode", "Blend mode for reflection. Additive is Color + reflection, Multiply is Color * reflection, and subtractive is Color - reflection"));
+ materialEditor.ShaderProperty(_ClearCoat, new GUIContent("Clearcoat", "Clearcoat"));
+
+ XSStyles.SeparatorThin();
+ materialEditor.TexturePropertySingleLine(new GUIContent("Baked Cubemap", "Baked cubemap."), _BakedCubemap);
+
+ XSStyles.SeparatorThin();
+ materialEditor.TexturePropertySingleLine(new GUIContent("Metallic Map", "Metallic Map, Metallic on Red Channel, Smoothness on Alpha Channel. \nIf Clearcoat is enabled, Clearcoat Smoothness on Green Channel, Clearcoat Reflectivity on Blue Channel."), _MetallicGlossMap);
+ materialEditor.TextureScaleOffsetProperty(_MetallicGlossMap);
+ materialEditor.ShaderProperty(_UVSetMetallic, new GUIContent("UV Set", "The UV set to use for the MetallicSmoothness Map"), 2);
+ materialEditor.ShaderProperty(_AnisotropicReflection, new GUIContent("Anisotropic", "Anisotropic, stretches reflection in an axis."), 2);
+ materialEditor.ShaderProperty(_Metallic, new GUIContent("Metallic", "Metallic, set to 1 if using metallic map"), 2);
+ materialEditor.ShaderProperty(_Glossiness, new GUIContent("Smoothness", "Smoothness, set to 1 if using metallic map"), 2);
+ materialEditor.ShaderProperty(_ClearcoatSmoothness, new GUIContent("Clearcoat Smoothness", "Smoothness of the clearcoat."), 2);
+ materialEditor.ShaderProperty(_ClearcoatStrength, new GUIContent("Clearcoat Reflectivity", "The strength of the clearcoat reflection."), 2);
+ }
+ else if (_ReflectionMode.floatValue == 2) //Matcap
+ {
+ materialEditor.ShaderProperty(_ReflectionBlendMode, new GUIContent("Reflection Blend Mode", "Blend mode for reflection. Additive is Color + reflection, Multiply is Color * reflection, and subtractive is Color - reflection"));
+
+ XSStyles.SeparatorThin();
+ materialEditor.TexturePropertySingleLine(new GUIContent("Matcap", "Matcap Texture"), _Matcap, _MatcapTint);
+ materialEditor.ShaderProperty(_Glossiness, new GUIContent("Matcap Blur", "Matcap blur, blurs the Matcap, set to 1 for full clarity"), 2);
+ materialEditor.ShaderProperty(_MatcapTintToDiffuse, new GUIContent("Tint To Diffuse", "Tints matcap to diffuse color."), 2);
+ material.SetFloat("_Metallic", 0);
+ material.SetFloat("_ClearCoat", 0);
+ material.SetTexture("_MetallicGlossMap", null);
+ }
+ if (_ReflectionMode.floatValue != 3)
+ {
+ XSStyles.SeparatorThin();
+ materialEditor.TexturePropertySingleLine(new GUIContent("Reflectivity Mask", "Mask for reflections."), _ReflectivityMask);
+ materialEditor.TextureScaleOffsetProperty(_ReflectivityMask);
+ materialEditor.ShaderProperty(_UVSetReflectivity, new GUIContent("UV Set", "The UV set to use for the Reflectivity Mask"), 2);
+ materialEditor.ShaderProperty(_Reflectivity, new GUIContent("Reflectivity", "The strength of the reflections."), 2);
+ }
+ if (_ReflectionMode.floatValue == 3)
+ {
+ material.SetFloat("_Metallic", 0);
+ material.SetFloat("_ReflectionBlendMode", 0);
+ material.SetFloat("_ClearCoat", 0);
+ }
+ }
+ }
+
+ private void DrawEmissionSettings(MaterialEditor materialEditor)
+ {
+ showEmission = XSStyles.ShurikenFoldout("Emission", showEmission);
+ if (showEmission)
+ {
+ materialEditor.TexturePropertySingleLine(new GUIContent("Emission Map", "Emissive map. White to black, unless you want multiple colors."), _EmissionMap, _EmissionColor);
+ materialEditor.TextureScaleOffsetProperty(_EmissionMap);
+ materialEditor.ShaderProperty(_UVSetEmission, new GUIContent("UV Set", "The UV set to use for the Emission Map"), 2);
+ materialEditor.ShaderProperty(_EmissionToDiffuse, new GUIContent("Tint To Diffuse", "Tints the emission to the Diffuse Color"), 2);
+
+ XSStyles.SeparatorThin();
+ materialEditor.ShaderProperty(_ScaleWithLight, new GUIContent("Scale w/ Light", "Scales the emission intensity based on how dark or bright the environment is."));
+ if (_ScaleWithLight.floatValue == 0)
+ materialEditor.ShaderProperty(_ScaleWithLightSensitivity, new GUIContent("Scaling Sensitivity", "How agressively the emission should scale with the light."));
+ }
+ }
+
+ private void DrawRimlightSettings(MaterialEditor materialEditor)
+ {
+ showRimlight = XSStyles.ShurikenFoldout("Rimlight", showRimlight);
+ if (showRimlight)
+ {
+ materialEditor.ShaderProperty(_RimColor, new GUIContent("Rimlight Tint", "The Tint of the Rimlight."));
+ materialEditor.ShaderProperty(_RimAlbedoTint, new GUIContent("Rim Albedo Tint", "How much the Albedo texture should effect the rimlight color."));
+ materialEditor.ShaderProperty(_RimCubemapTint, new GUIContent("Rim Environment Tint", "How much the Environment cubemap should effect the rimlight color."));
+ materialEditor.ShaderProperty(_RimAttenEffect, new GUIContent("Rim Attenuation Effect", "How much should realtime shadows mask out the rimlight?"));
+ materialEditor.ShaderProperty(_RimIntensity, new GUIContent("Rimlight Intensity", "Strength of the Rimlight."));
+ materialEditor.ShaderProperty(_RimRange, new GUIContent("Range", "Range of the Rim"), 2);
+ materialEditor.ShaderProperty(_RimThreshold, new GUIContent("Threshold", "Threshold of the Rim"), 2);
+ materialEditor.ShaderProperty(_RimSharpness, new GUIContent("Sharpness", "Sharpness of the Rim"), 2);
+ }
+ }
+
+ private void DrawHalfToneSettings(MaterialEditor materialEditor)
+ {
+ showHalftones = XSStyles.ShurikenFoldout("Halftones", showHalftones);
+ if (showHalftones)
+ {
+ materialEditor.ShaderProperty(_HalftoneType, new GUIContent("Halftone Style", "Controls where halftone and stippling effects are drawn."));
+
+ if (_HalftoneType.floatValue == 1 || _HalftoneType.floatValue == 2)
+ {
+ materialEditor.ShaderProperty(_HalftoneDotSize, new GUIContent("Stippling Scale", "How large should the stippling pattern be?"));
+ materialEditor.ShaderProperty(_HalftoneDotAmount, new GUIContent("Stippling Density", "How dense is the stippling effect?"));
+ }
+
+ if (_HalftoneType.floatValue == 0 || _HalftoneType.floatValue == 2)
+ {
+ materialEditor.ShaderProperty(_HalftoneLineAmount, new GUIContent("Halftone Line Count", "How many lines should the halftone shadows have?"));
+ materialEditor.ShaderProperty(_HalftoneLineIntensity, new GUIContent("Halftone Line Intensity", "How dark should the halftone lines be?"));
+ }
+ }
+ }
+
+ private void DrawTransmissionSettings(MaterialEditor materialEditor)
+ {
+ showSubsurface = XSStyles.ShurikenFoldout("Transmission", showSubsurface);
+ if (showSubsurface)
+ {
+ materialEditor.TexturePropertySingleLine(new GUIContent("Thickness Map", "Thickness Map, used to mask areas where transmission can happen"), _ThicknessMap);
+ materialEditor.TextureScaleOffsetProperty(_ThicknessMap);
+ materialEditor.ShaderProperty(_UVSetThickness, new GUIContent("UV Set", "The UV set to use for the Thickness Map"), 2);
+ XSStyles.constrainedShaderProperty(materialEditor, _SSColor, new GUIContent("Transmission Color", "Transmission Color"), 2);
+ materialEditor.ShaderProperty(_SSDistortion, new GUIContent("Transmission Distortion", "How much the Transmission should follow the normals of the mesh and/or normal map."), 2);
+ materialEditor.ShaderProperty(_SSPower, new GUIContent("Transmission Power", "Subsurface Power"), 2);
+ materialEditor.ShaderProperty(_SSScale, new GUIContent("Transmission Scale", "Subsurface Scale"), 2);
+ }
+ }
+
+ private void DrawRefractionSettings(MaterialEditor materialEditor)
+ {
+ if (isRefractive)
+ {
+ showRefractionSettings = XSStyles.ShurikenFoldout("Refraction", showRefractionSettings);
+ if (showRefractionSettings)
+ {
+ materialEditor.ShaderProperty(_RefractionModel, new GUIContent("Refraction Model", "Refraction technique"));
+ materialEditor.ShaderProperty(_IOR, new GUIContent("Index of Refraction", "The index of refraction of the material. Glass: 1.5, Crystal: 2.0, Ice: 1.309, Water: 1.325"));
+ }
+ }
+ }
+
+ private void DrawAdvancedSettings(MaterialEditor materialEditor)
+ {
+ if (_AdvMode.floatValue == 1)
+ {
+ showAdvanced = XSStyles.ShurikenFoldout("Advanced Settings", showAdvanced);
+ if (showAdvanced)
+ {
+ materialEditor.ShaderProperty(_VertexColorAlbedo, new GUIContent("Vertex Color Albedo", "Multiplies the vertex color of the mesh by the Albedo texture to derive the final Albedo color."));
+ if (isDithered || isCutout)
+ {
+ materialEditor.ShaderProperty(_UseClipsForDissolve, new GUIContent("Control Dissolve With Clip"));
+ materialEditor.TexturePropertySingleLine(new GUIContent("Clip Map (RGBA)", "Used to control clipping in an advanced manner, read tooltip for Clip Mask Vectors below."), _ClipMap);
+ materialEditor.TextureScaleOffsetProperty(_ClipMap);
+ materialEditor.ShaderProperty(_UVSetClipMap, new GUIContent("UV Set", "The UV set to use for the Clip Map"), 2);
+ materialEditor.ShaderProperty(_ClipAgainstVertexColorGreaterZeroFive, new GUIContent("Clip Mask > 0.5 Opacity", "Uses the Clip Map RGBA channels as a multiplier for clipping."));
+ _ClipAgainstVertexColorGreaterZeroFive.vectorValue = ClampVec4(_ClipAgainstVertexColorGreaterZeroFive.vectorValue);
+ materialEditor.ShaderProperty(_ClipAgainstVertexColorLessZeroFive, new GUIContent("Clip Mask Color < 0.5 Opacity", "Uses the Clip Map RGBA channels as a multiplier for clipping."));
+ _ClipAgainstVertexColorLessZeroFive.vectorValue = ClampVec4(_ClipAgainstVertexColorLessZeroFive.vectorValue);
+ }
+
+ materialEditor.ShaderProperty(_Stencil, _Stencil.displayName);
+ materialEditor.ShaderProperty(_StencilComp, _StencilComp.displayName);
+ materialEditor.ShaderProperty(_StencilOp, _StencilOp.displayName);
+
+ materialEditor.RenderQueueField();
+ }
+ }
+ }
+
+ private void DrawPatreonSettings(MaterialEditor materialEditor)
+ {
+ //Plugins for Patreon releases
+ if (isPatreonShader)
+ {
+ if (isEyeTracking)
+ {
+ showEyeTracking = XSStyles.ShurikenFoldout("Eye Tracking Settings", showEyeTracking);
+ if (showEyeTracking)
+ {
+ materialEditor.ShaderProperty(_LeftRightPan, new GUIContent("Left Right Adj.", "Adjusts the eyes manually left or right."));
+ materialEditor.ShaderProperty(_UpDownPan, new GUIContent("Up Down Adj.", "Adjusts the eyes manually up or down."));
+
+ XSStyles.SeparatorThin();
+ materialEditor.ShaderProperty(_AttentionSpan, new GUIContent("Attention Span", "How often should the eyes look at the target; 0 = never, 1 = always, 0.5 = half of the time."));
+ materialEditor.ShaderProperty(_FollowPower, new GUIContent("Follow Power", "The influence the target has on the eye"));
+ materialEditor.ShaderProperty(_LookSpeed, new GUIContent("Look Speed", "How fast the eye transitions to looking at the target"));
+ materialEditor.ShaderProperty(_Twitchyness, new GUIContent("Refocus Frequency", "How much should the eyes look around near the target?"));
+
+ XSStyles.SeparatorThin();
+ materialEditor.ShaderProperty(_IrisSize, new GUIContent("Iris Size", "Size of the iris"));
+ materialEditor.ShaderProperty(_FollowLimit, new GUIContent("Follow Limit", "Limits the angle from the front of the face on how far the eyes can track/rotate."));
+ materialEditor.ShaderProperty(_EyeOffsetLimit, new GUIContent("Offset Limit", "Limit for how far the eyes can turn"));
+ }
+ }
+ }
+ //
+ }
+
+ private void DrawPenetratorSettings(MaterialEditor materialEditor)
+ {
+ //Plugin for Dynamic Penetration System
+ if(isPenetratorShader)
+ {
+ showPenetrator = XSStyles.ShurikenFoldout("Dynamic Penetration System", showPenetrator);
+ if (showPenetrator) {
+ materialEditor.ShaderProperty(_Squeeze, new GUIContent("Squeeze Minimum Size", "Minimum diameter the penetrator squeezes to when entering an orifice"));
+ materialEditor.ShaderProperty(_SqueezeDist, new GUIContent("Squeeze Smoothness", "How far along the length the penetrator is squeezed when entering an orifice (Squeeze Smoothing)"));
+ materialEditor.ShaderProperty(_BulgePower, new GUIContent("Bulge Amount", "How much the penetrator bulges when entering an orifice"));
+ materialEditor.ShaderProperty(_BulgeOffset, new GUIContent("Bulge Length", "How far along the length the buldge goes"));
+ materialEditor.ShaderProperty(_Length, new GUIContent("Length of Penetrator Model", "Set this to zero, then slowly increase it until your model is fully visible"));
+ materialEditor.ShaderProperty(_EntranceStiffness, new GUIContent("Entrance Stiffness", "Reduces tip bending when entering an orifice"));
+ materialEditor.ShaderProperty(_Curvature, new GUIContent("Curvature", "You see those warriors from Hammerfell? They've got curved swords. Curved. Swords!"));
+ materialEditor.ShaderProperty(_ReCurvature, new GUIContent("ReCurvature", "S curve"));
+ materialEditor.ShaderProperty(_Wriggle, new GUIContent("Wriggle Amount", "The amount of wriggle"));
+ materialEditor.ShaderProperty(_WriggleSpeed, new GUIContent("Wriggle Speed", "How fast the penetrator wriggles!"));
+ XSStyles.SeparatorThin();
+ materialEditor.ShaderProperty(_OrificeChannel, new GUIContent("OrificeChannel", "Set to 1 to make the penetrator to only interact with channel 1 orifices"));
+ }
+ }
+ //
+ }
+
+ private void DrawOrificeSettings(MaterialEditor materialEditor)
+ {
+ //Plugin for Dynamic Penetration System
+ if(isOrificeShader)
+ {
+ showPenetrator = XSStyles.ShurikenFoldout("Dynamic Penetration System", showPenetrator);
+ if (showPenetrator)
+ {
+ materialEditor.TexturePropertySingleLine(new GUIContent("OrificeData", "Generate with Tools > Raliv > Orifice Setup"), _OrificeData);
+ materialEditor.ShaderProperty(_EntryOpenDuration, new GUIContent("Entry Trigger Duration", "How much penetration it takes the entry deformation to activate"));
+ materialEditor.ShaderProperty(_Shape1Depth, new GUIContent("Shape 1 Trigger Depth", "Penetration depth at which shape 1 begins deforming"));
+ materialEditor.ShaderProperty(_Shape1Duration, new GUIContent("Shape 1 Trigger Duration", "How much penetration it takes shape 1 deformation to activate"));
+ materialEditor.ShaderProperty(_Shape2Depth, new GUIContent("Shape 2 Trigger Depth", "Penetration depth at which shape 2 begins deforming"));
+ materialEditor.ShaderProperty(_Shape2Duration, new GUIContent("Shape 2 Trigger Duration", "How much penetration it takes shape 2 deformation to activate"));
+ materialEditor.ShaderProperty(_Shape3Depth, new GUIContent("Shape 3 Trigger Depth", "Penetration depth at which shape 3 begins deforming"));
+ materialEditor.ShaderProperty(_Shape3Duration, new GUIContent("Shape 3 Trigger Duration", "How much penetration it takes shape 3 deformation to activate"));
+ materialEditor.ShaderProperty(_BlendshapePower, new GUIContent("Blend Shape Power", "Adjusts the amount the mesh deforms"));
+ materialEditor.ShaderProperty(_BlendshapeBadScaleFix, new GUIContent("Blend Shape Bad Scale Fix", "If your model has 100s in its scale, and you can't figure out how to fix it"));
+ XSStyles.SeparatorThin();
+ materialEditor.ShaderProperty(_OrificeChannel, new GUIContent("OrificeChannel", "Set to 1 to make the penetrator to only interact with channel 1 orifices"));
+ }
+ }
+ //
+ }
+
+
+
+ private Vector4 ClampVec4(Vector4 vec)
+ {
+ Vector4 value = vec;
+ value.x = Mathf.Clamp01(value.x);
+ value.y = Mathf.Clamp01(value.y);
+ value.z = Mathf.Clamp01(value.z);
+ value.w = Mathf.Clamp01(value.w);
+ return value;
+ }
+ }
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSToonInspector.cs.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSToonInspector.cs.meta
new file mode 100644
index 00000000..4935b9aa
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSToonInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c544548cc23a44b40be4d0d21eaf6ff1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSUpdater.cs b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSUpdater.cs
new file mode 100644
index 00000000..0d9d6dd5
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSUpdater.cs
@@ -0,0 +1,210 @@
+using UnityEngine;
+using UnityEngine.Networking;
+using UnityEditor;
+using System.Collections.Generic;
+using System.IO;
+namespace XSToonDynamicPenetration
+{
+ public class XSUpdater : EditorWindow
+ {
+ [MenuItem("Tools/Xiexe/XSToon/About - Updater")]
+ // Use this for initialization
+ static public void Init()
+ {
+ XSUpdater window = EditorWindow.GetWindow<XSUpdater>(true, "XSToon: Docs & Updater", true);
+ window.minSize = new Vector2(400, 300);
+ window.maxSize = new Vector2(401, 501);
+ }
+
+ private static string[] patrons = {};
+ private static string path;
+
+ static int tab = 0;
+ static string updateUrl = "https://api.github.com/repos/Xiexe/Xiexes-Unity-Shaders/releases/latest";
+ static string docsURL = "https://docs.google.com/document/d/1xJ4PID_nwqVm_UCsO2c2gEdiEoWoCGeM_GDK_L8-aZE";
+ static string patronsURL = "https://raw.githubusercontent.com/Xiexe/thefoxden/master/assets/patronlist/patronlist.txt";
+
+ static UnityWebRequest www;
+ static string changelog;
+ static string publishdate;
+ static string curVer;
+ static string downloadLink;
+ bool hasCalledPatronlist = false;
+ static bool showInfo = false;
+ Vector2 scrollPos;
+
+ public void OnGUI()
+ {
+ tab = GUILayout.Toolbar (tab, new string[] {"Documentation", "Updater", "Social"});
+ XSStyles.SeparatorThin();
+ switch(tab) {
+ case 0:
+ //show Docs from git
+ XSStyles.doLabel("You can find Documentation here.");
+ if(GUILayout.Button("Open Documentation"))
+ Application.OpenURL(docsURL);
+
+ break;
+
+ case 1:
+ EditorGUI.BeginChangeCheck();
+
+ XSStyles.HelpBox("The currently installed version is: v" + XSStyles.ver + "\n\nTo check for updates, use the update button. If you choose to download an update, you will need to manually overwrite the old install by extracting the .zip into the project using the windows explorer. \n\nDo not drag the update directly into Unity - it won't ask to overwrite - it'll just create a duplicate and break.", MessageType.Info);
+ XSStyles.SeparatorThin();
+ if (GUILayout.Button("Check for Updates"))
+ {
+ req(updateUrl);
+ EditorApplication.update += changelogEditorUpdate;
+ showInfo = true;
+ }
+
+ if(showInfo){
+
+ scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
+ Repaint();
+ XSStyles.doLabelLeft("Newest version: ");
+ XSStyles.doLabelSmall(curVer);
+ XSStyles.SeparatorThin();
+
+ XSStyles.doLabelLeft("Release Date: ");
+ XSStyles.doLabelSmall(publishdate);
+ XSStyles.SeparatorThin();
+
+ XSStyles.doLabelLeft("Changelog: ");
+ XSStyles.doLabelSmall(changelog);
+
+ EditorGUILayout.EndScrollView();
+ XSStyles.SeparatorThin();
+ if (GUILayout.Button("Download")){
+ Application.OpenURL(downloadLink);
+ }
+
+ }
+ else{
+ XSStyles.doLabel("Hit 'Check for Updates' to begin");
+ }
+ EditorGUI.EndChangeCheck();
+
+ break;
+
+ case 2:
+ //show Patrons
+
+ XSStyles.doLabel("Thank you to my patreon supporters, and the people who have helped me along the way, you guys are great!\n Note: You must be in the Discord server to show on this list.");
+ XSStyles.SeparatorThin();
+ XSStyles.doLabel("Current Patrons");
+ XSStyles.SeparatorThin();
+ scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
+ if(!hasCalledPatronlist)
+ {
+ hasCalledPatronlist = true;
+ req(patronsURL);
+ EditorApplication.update += EditorUpdate;
+ }
+ for(int i = 0; i < patrons.Length; i++)
+ {
+ XSStyles.doLabel(" - " + patrons[i]);
+ }
+ EditorGUILayout.EndScrollView();
+
+ XSStyles.SeparatorThin();
+ //show social links
+ EditorGUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+ XSStyles.discordButton(70, 30);
+ XSStyles.patreonButton(70, 30);
+ XSStyles.githubButton(70, 30);
+ GUILayout.FlexibleSpace();
+ EditorGUILayout.EndHorizontal();
+ break;
+ }
+
+
+ }
+
+ static void req(string url)
+ {
+ www = UnityWebRequest.Get(url);
+ www.SendWebRequest();
+ //Debug.Log("Checking for updates...");
+ }
+ static void EditorUpdate()
+ {
+ while (!www.isDone)
+ return;
+
+ if (www.isNetworkError)
+ Debug.Log(www.error);
+ else
+ {
+ patrons = www.downloadHandler.text.Split('\n');
+ Debug.Log("Fetching Patron list of: " + patrons.Length);
+ }
+ EditorApplication.update -= EditorUpdate;
+ }
+
+ static void updateHandler(string apiResult)
+ {
+ gitAPI git = JsonUtility.FromJson<gitAPI>(apiResult);
+ bool option = EditorUtility.DisplayDialog("XSToon: Updater",
+ "You are on version: \nv" + XSStyles.ver + "\n\nThe latest version is: \n" + git.tag_name + "\n\n You can view the changelog either on my Discord, or at the Github page for this release." + "\n\nWould you like to update?",
+ "Download", "Cancel");
+
+ switch (option)
+ {
+ case true:
+ Application.OpenURL(git.zipball_url);
+ break;
+
+ case false:
+ Debug.Log("Cancelled Update.");
+ break;
+ }
+ // Debug.Log(apiResult);
+ }
+
+ static void changelogEditorUpdate()
+ {
+ while (!www.isDone)
+ return;
+
+ if (www.isNetworkError)
+ Debug.Log(www.error);
+ else
+ fetchChangelog(www.downloadHandler.text);
+
+ EditorApplication.update -= changelogEditorUpdate;
+ }
+
+ static void fetchChangelog(string apiResult)
+ {
+ gitAPI git = JsonUtility.FromJson<gitAPI>(apiResult);
+
+ publishdate = git.published_at;
+ curVer = git.tag_name;
+ changelog = git.body;
+ downloadLink = git.zipball_url;
+ //oldChangelog =
+
+ // Debug.Log(git.body);
+ // Debug.Log(apiResult);
+ // Debug.Log(git.tag_name);
+ // Debug.Log(git.html_url);
+ // Debug.Log(git.published_at);
+ // Debug.Log(git.zipball_url);
+ // Debug.Log(git.body);
+
+ }
+
+ public class gitAPI
+ {
+ public string name;
+ public string tag_name;
+ public string html_url;
+ public string published_at;
+ public string zipball_url;
+ public string body;
+ }
+
+ }
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSUpdater.cs.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSUpdater.cs.meta
new file mode 100644
index 00000000..37802156
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Editor/XSUpdater.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0610a99a2460971418b9abfff1af85a8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/LICENSE b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/LICENSE
new file mode 100644
index 00000000..57faf212
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Xiexe
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/LICENSE.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/LICENSE.meta
new file mode 100644
index 00000000..5e931550
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/LICENSE.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 0c35eab238fbd3942ad83306110a498a
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main.meta
new file mode 100644
index 00000000..6efdaac1
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: adbef5eb959b07648beb85bafbcdfa1d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes.meta
new file mode 100644
index 00000000..09908463
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f9f24ad9b2b1c9440b5ed1fa0d11306c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSDefines.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSDefines.cginc
new file mode 100644
index 00000000..b59d96f7
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSDefines.cginc
@@ -0,0 +1,216 @@
+#include "UnityPBSLighting.cginc"
+#include "AutoLight.cginc"
+#include "UnityCG.cginc"
+
+struct VertexInput
+{
+ float4 vertex : POSITION;
+ float2 uv : TEXCOORD0;
+ float2 uv1 : TEXCOORD1;
+ float2 uv2 : TEXCOORD2;
+ float3 normal : NORMAL;
+ float4 tangent : TANGENT;
+ float4 color : COLOR;
+};
+
+struct VertexOutput
+{
+ #if defined(Geometry)
+ float4 pos : CLIP_POS;
+ float4 vertex : SV_POSITION; // We need both of these in order to shadow Outlines correctly
+ #else
+ float4 pos : SV_POSITION;
+ #endif
+
+ float2 uv : TEXCOORD0;
+ float2 uv1 : TEXCOORD1;
+ float3 ntb[3] : TEXCOORD2; //texcoord 3, 4 || Holds World Normal, Tangent, and Bitangent
+ float4 worldPos : TEXCOORD5;
+ float4 color : TEXCOORD6;
+ float3 normal : TEXCOORD8;
+ float4 screenPos : TEXCOORD9;
+ float3 objPos : TEXCOORD11;
+ float2 uv2 : TEXCOORD12;
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ SHADOW_COORDS(7)
+ UNITY_FOG_COORDS(10)
+ #endif
+};
+
+#if defined(Geometry)
+ struct v2g
+ {
+ float4 pos : CLIP_POS;
+ float4 vertex : SV_POSITION;
+ float2 uv : TEXCOORD0;
+ float2 uv1 : TEXCOORD1;
+ float3 ntb[3] : TEXCOORD2; //texcoord 3, 4 || Holds World Normal, Tangent, and Bitangent
+ float4 worldPos : TEXCOORD5;
+ float4 color : TEXCOORD6;
+ float3 normal : TEXCOORD8;
+ float4 screenPos : TEXCOORD9;
+ float3 objPos : TEXCOORD11;
+ float2 uv2 : TEXCOORD12;
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ SHADOW_COORDS(7)
+ UNITY_FOG_COORDS(10)
+ #endif
+ };
+
+ struct g2f
+ {
+ float4 pos : SV_POSITION;
+ float2 uv : TEXCOORD0;
+ float2 uv1 : TEXCOORD1;
+ float3 ntb[3] : TEXCOORD2; //texcoord 3, 4 || Holds World Normal, Tangent, and Bitangent
+ float4 worldPos : TEXCOORD5;
+ float4 color : TEXCOORD6;
+ float4 screenPos : TEXCOORD8;
+ float3 objPos : TEXCOORD10;
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ SHADOW_COORDS(7)
+ UNITY_FOG_COORDS(9)
+ #endif
+ };
+#endif
+
+struct XSLighting
+{
+ half4 albedo;
+ half4 normalMap;
+ half4 detailNormal;
+ half4 detailMask;
+ half4 metallicGlossMap;
+ half4 reflectivityMask;
+ half4 specularMap;
+ half4 thickness;
+ half4 occlusion;
+ half4 emissionMap;
+ half4 rampMask;
+ half4 hsvMask;
+ half4 clipMap;
+ half4 dissolveMask;
+ half3 diffuseColor;
+ half attenuation;
+ half3 normal;
+ half3 tangent;
+ half3 bitangent;
+ half4 worldPos;
+ half3 color;
+ half alpha;
+ float isOutline;
+ float4 screenPos;
+ float2 screenUV;
+ float3 objPos;
+};
+
+struct TextureUV
+{
+ half2 uv0;
+ half2 uv1;
+ half2 albedoUV;
+ half2 specularMapUV;
+ half2 metallicGlossMapUV;
+ half2 detailMaskUV;
+ half2 normalMapUV;
+ half2 detailNormalUV;
+ half2 thicknessMapUV;
+ half2 occlusionUV;
+ half2 reflectivityMaskUV;
+ half2 emissionMapUV;
+ half2 outlineMaskUV;
+ half2 clipMapUV;
+ half2 dissolveUV;
+};
+
+struct DotProducts
+{
+ half ndl;
+ half vdn;
+ half vdh;
+ half tdh;
+ half bdh;
+ half ndh;
+ half rdv;
+ half ldh;
+ half svdn;
+};
+
+struct VertexLightInformation {
+ float3 Direction[4];
+ float3 ColorFalloff[4];
+ float Attenuation[4];
+};
+
+UNITY_DECLARE_TEX2D(_MainTex); half4 _MainTex_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_ClipMap); half4 _ClipMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_DissolveTexture); half4 _DissolveTexture_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_BumpMap); half4 _BumpMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_DetailNormalMap); half4 _DetailNormalMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_DetailMask); half4 _DetailMask_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_SpecularMap); half4 _SpecularMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_MetallicGlossMap); half4 _MetallicGlossMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_ReflectivityMask); half4 _ReflectivityMask_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_ThicknessMap); half4 _ThicknessMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_EmissionMap); half4 _EmissionMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_RampSelectionMask);
+UNITY_DECLARE_TEX2D_NOSAMPLER(_HSVMask);
+sampler2D _OcclusionMap; half4 _OcclusionMap_ST;
+sampler2D _OutlineMask;
+sampler2D _Matcap;
+sampler2D _Ramp;
+samplerCUBE _BakedCubemap;
+sampler2D _GrabTexture;
+float4 _GrabTexture_TexelSize;
+
+#if defined(UNITY_PASS_SHADOWCASTER)
+ sampler3D _DitherMaskLOD;
+#endif
+
+half4 _Color;
+half4 _ClipAgainstVertexColorGreaterZeroFive, _ClipAgainstVertexColorLessZeroFive;
+half _Cutoff;
+half _DissolveProgress, _DissolveStrength;
+int _DissolveCoordinates;
+int _UseClipsForDissolve;
+
+half4 _ShadowRim,
+ _OutlineColor, _SSColor,
+ _EmissionColor, _MatcapTint,
+ _RimColor, _DissolveColor;
+
+half _MatcapTintToDiffuse;
+
+half _FadeDitherDistance;
+half _EmissionToDiffuse, _ScaleWithLightSensitivity;
+half _Hue, _Saturation, _Value;
+half _Metallic, _Glossiness, _OcclusionIntensity, _Reflectivity, _ClearcoatStrength, _ClearcoatSmoothness;
+half _BumpScale, _DetailNormalMapScale;
+half _SpecularIntensity, _SpecularSharpness, _SpecularArea, _AnisotropicSpecular, _AnisotropicReflection, _SpecularAlbedoTint;
+half _IOR;
+half _HalftoneDotSize, _HalftoneDotAmount, _HalftoneLineAmount, _HalftoneLineIntensity;
+half _RimRange, _RimThreshold, _RimIntensity, _RimSharpness, _RimAlbedoTint, _RimCubemapTint, _RimAttenEffect;
+half _ShadowRimRange, _ShadowRimThreshold, _ShadowRimSharpness, _ShadowSharpness, _ShadowRimAlbedoTint;
+half _SSDistortion, _SSPower, _SSScale;
+half _OutlineWidth;
+
+int _HalftoneType;
+int _FadeDither;
+int _BlendMode;
+int _OcclusionMode;
+int _UseRefraction;
+int _ReflectionMode, _ReflectionBlendMode, _ClearCoat;
+int _TilingMode, _VertexColorAlbedo, _ScaleWithLight;
+int _OutlineAlbedoTint, _OutlineLighting, _OutlineNormalMode;
+int _UVSetAlbedo, _UVSetNormal, _UVSetDetNormal,
+ _UVSetDetMask, _UVSetMetallic, _UVSetSpecular,
+ _UVSetThickness, _UVSetOcclusion, _UVSetReflectivity,
+ _UVSetEmission, _UVSetClipMap, _UVSetDissolve;
+int _NormalMapMode, _OutlineUVSelect;
+
+//Defines for helper functions
+#define grayscaleVec float3(0.2125, 0.7154, 0.0721)
+#define WorldNormalVector(normal0, normal) half3(dot(normal0,normal), dot(normal0, normal), dot(normal0,normal)) \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSDefines.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSDefines.cginc.meta
new file mode 100644
index 00000000..d41dd6af
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSDefines.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 475129dd3056c984bbe2c6c2203c9759
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSFrag.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSFrag.cginc
new file mode 100644
index 00000000..eef3aef5
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSFrag.cginc
@@ -0,0 +1,88 @@
+float4 frag (
+ #if defined(Geometry)
+ g2f i
+ #else
+ VertexOutput i
+ #endif
+ , uint facing : SV_IsFrontFace
+ ) : SV_Target
+{
+ TextureUV t = (TextureUV)0; // Populate UVs
+ if(_TilingMode != 1) { InitializeTextureUVs(i, t); } else { InitializeTextureUVsMerged(i, t); };
+
+ #ifdef UNITY_PASS_SHADOWCASTER
+ XSLighting o = (XSLighting)0; //Populate Lighting Struct, but only with important shadowcaster stuff!
+ o.albedo = UNITY_SAMPLE_TEX2D(_MainTex, t.albedoUV) * _Color * lerp(1, float4(i.color.rgb, 1), _VertexColorAlbedo);
+ o.clipMap = UNITY_SAMPLE_TEX2D_SAMPLER(_ClipMap, _MainTex, t.clipMapUV);
+ o.dissolveMask = UNITY_SAMPLE_TEX2D_SAMPLER(_DissolveTexture, _MainTex, t.dissolveUV);
+
+ o.worldPos = i.worldPos;
+ o.screenUV = calcScreenUVs(i.screenPos);
+ o.screenPos = i.screenPos;
+ o.objPos = i.objPos;
+
+ float4 outCol = 0;
+ calcAlpha(o);
+ calcDissolve(o, outCol);
+ SHADOW_CASTER_FRAGMENT(i);
+ #else
+ UNITY_LIGHT_ATTENUATION(attenuation, i, i.worldPos.xyz);
+
+ // fix for rare bug where light atten is 0 when there is no directional light in the scene
+ #ifdef UNITY_PASS_FORWARDBASE
+ if(all(_LightColor0.rgb == 0.0))
+ {
+ attenuation = 1.0;
+ }
+ #endif
+
+ #if defined(DIRECTIONAL)
+ half sharp = _ShadowSharpness * 0.5;
+ attenuation = smoothstep(sharp, 1-sharp, attenuation); //Converge at the center line
+ #endif
+
+ bool face = facing > 0; // True if on front face, False if on back face
+ if (!face) // Invert Normals based on face
+ {
+ if(i.color.a > 0.99) { discard; }//Discard outlines front face always. This way cull off and outlines can be enabled.
+
+ i.ntb[0] = -i.ntb[0];
+ i.ntb[1] = -i.ntb[1];
+ i.ntb[2] = -i.ntb[2];
+ }
+
+ XSLighting o = (XSLighting)0; //Populate Lighting Struct
+ o.albedo = UNITY_SAMPLE_TEX2D(_MainTex, t.albedoUV) * _Color * lerp(1, float4(i.color.rgb, 1), _VertexColorAlbedo);
+ o.specularMap = UNITY_SAMPLE_TEX2D_SAMPLER(_SpecularMap, _MainTex, t.specularMapUV);
+ o.metallicGlossMap = UNITY_SAMPLE_TEX2D_SAMPLER(_MetallicGlossMap, _MainTex, t.metallicGlossMapUV);
+ o.detailMask = UNITY_SAMPLE_TEX2D_SAMPLER(_DetailMask, _MainTex, t.detailMaskUV);
+ o.normalMap = UNITY_SAMPLE_TEX2D_SAMPLER(_BumpMap, _MainTex, t.normalMapUV);
+ o.detailNormal = UNITY_SAMPLE_TEX2D_SAMPLER(_DetailNormalMap, _MainTex, t.detailNormalUV);
+ o.thickness = UNITY_SAMPLE_TEX2D_SAMPLER(_ThicknessMap, _MainTex, t.thicknessMapUV);
+ o.occlusion = tex2D(_OcclusionMap, t.occlusionUV);
+ o.reflectivityMask = UNITY_SAMPLE_TEX2D_SAMPLER(_ReflectivityMask, _MainTex, t.reflectivityMaskUV) * _Reflectivity;
+ o.emissionMap = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap, _MainTex, t.emissionMapUV) * _EmissionColor;
+ o.rampMask = UNITY_SAMPLE_TEX2D_SAMPLER(_RampSelectionMask, _MainTex, i.uv); // This texture doesn't need to ever be on a second uv channel, and doesn't need tiling, convince me otherwise.
+ o.hsvMask = UNITY_SAMPLE_TEX2D_SAMPLER(_HSVMask, _MainTex, t.albedoUV);
+ o.clipMap = UNITY_SAMPLE_TEX2D_SAMPLER(_ClipMap, _MainTex, t.clipMapUV);
+ o.dissolveMask = UNITY_SAMPLE_TEX2D_SAMPLER(_DissolveTexture, _MainTex, t.dissolveUV);
+
+ o.diffuseColor = o.albedo.rgb; //Store this to separate the texture color and diffuse color for later.
+ o.attenuation = attenuation;
+ o.normal = i.ntb[0];
+ o.tangent = i.ntb[1];
+ o.bitangent = i.ntb[2];
+ o.worldPos = i.worldPos;
+ o.color = i.color.rgb;
+ o.isOutline = i.color.a;
+ o.screenUV = calcScreenUVs(i.screenPos);
+ o.screenPos = i.screenPos;
+ o.objPos = i.objPos;
+
+ float4 col = BRDF_XSLighting(o);
+ calcAlpha(o);
+ calcDissolve(o, col);
+ UNITY_APPLY_FOG(i.fogCoord, col);
+ return float4(col.rgb, o.alpha);
+ #endif
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSFrag.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSFrag.cginc.meta
new file mode 100644
index 00000000..02ff2f77
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSFrag.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: b6800622dae7e6f4bba02dffcc5f5868
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSGeom.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSGeom.cginc
new file mode 100644
index 00000000..f1077558
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSGeom.cginc
@@ -0,0 +1,95 @@
+#if defined(Geometry)
+ #define TRANSFER_SHADOW_CASTER_NOPOS_GEOMETRY(o, opos, vertexPosition, vertexNormal) \
+ opos = UnityClipSpaceShadowCasterPos(vertexPosition, vertexNormal); \
+ opos = UnityApplyLinearShadowBias(opos);
+
+ [maxvertexcount(6)]
+ void geom(triangle v2g IN[3], inout TriangleStream<g2f> tristream)
+ {
+ g2f o = (g2f)0;
+
+ //Main Mesh loop
+ for (int i = 0; i < 3; i++)
+ {
+ o.pos = UnityObjectToClipPos(IN[i].vertex);
+ o.worldPos = IN[i].worldPos;
+ o.ntb[0] = IN[i].ntb[0];
+ o.ntb[1] = IN[i].ntb[1];
+ o.ntb[2] = IN[i].ntb[2];
+ o.uv = IN[i].uv;
+ o.uv1 = IN[i].uv1;
+ o.color = float4(IN[i].color.rgb,0); // store if outline in alpha channel of vertex colors | 0 = not an outline
+ o.screenPos = ComputeScreenPos(o.pos);
+ o.objPos = normalize(IN[i].vertex);
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ UNITY_TRANSFER_SHADOW(o, o.uv);
+ UNITY_TRANSFER_FOG(o, o.pos);
+ #else
+ TRANSFER_SHADOW_CASTER_NOPOS_GEOMETRY(o, o.pos, IN[i].vertex, IN[i].ntb[0]);
+ #endif
+ tristream.Append(o);
+ }
+ tristream.RestartStrip();
+
+ //Outlines loop
+ for (int i = 2; i >= 0; i--)
+ {
+ float4 worldPos = (mul(unity_ObjectToWorld, IN[i].vertex));
+ half outlineWidthMask = tex2Dlod(_OutlineMask, float4(IN[i].uv, 0, 0));
+ float3 outlineWidth = outlineWidthMask * _OutlineWidth * .01;
+ outlineWidth *= min(distance(worldPos, _WorldSpaceCameraPos) * 3, 1);
+
+ float3 vc = IN[i].color.rgb;
+ if(_OutlineNormalMode == 2)
+ {
+ float2 xy = IN[i].uv1;
+ if(_OutlineUVSelect == 1)
+ xy = IN[i].uv2;
+
+ float reconstructedZ = sqrt(1-saturate(dot(xy, xy)));
+ vc = normalize(float3(xy, reconstructedZ));
+ }
+ vc = vc * 2 - 1;
+ float3 t = mul(unity_WorldToObject, IN[i].ntb[1]);
+ float3 b = mul(unity_WorldToObject, IN[i].ntb[2]);
+ float3 n = mul(unity_WorldToObject, IN[i].ntb[0]);
+ half3 tspace0 = half3(t.x, b.x, n.x);
+ half3 tspace1 = half3(t.y, b.y, n.y);
+ half3 tspace2 = half3(t.z, b.z, n.z);
+
+ half3 calcedNormal;
+ calcedNormal.x = dot(tspace0, vc);
+ calcedNormal.y = dot(tspace1, vc);
+ calcedNormal.z = dot(tspace2, vc);
+
+ half3 normalDir = normalize(lerp(IN[i].normal, calcedNormal, saturate(_OutlineNormalMode)));
+ float4 outlinePos = float4(IN[i].vertex + normalDir * outlineWidth, 1);
+
+ if(outlineWidthMask == 0)
+ return;
+
+ o.pos = UnityObjectToClipPos(outlinePos);
+ o.worldPos = worldPos;
+ o.ntb[0] = IN[i].ntb[0];
+ o.ntb[1] = IN[i].ntb[1];
+ o.ntb[2] = IN[i].ntb[2];
+ o.uv = IN[i].uv;
+ o.uv1 = IN[i].uv1;
+ o.color = float4(IN[i].color.rgb, 1); // store if outline in alpha channel of vertex colors | 1 = is an outline
+ o.screenPos = ComputeScreenPos(o.pos);
+ o.objPos = normalize(outlinePos);
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ UNITY_TRANSFER_SHADOW(o, o.uv);
+ UNITY_TRANSFER_FOG(o, o.pos);
+ #else
+ TRANSFER_SHADOW_CASTER_NOPOS_GEOMETRY(o, o.pos, outlinePos, IN[i].ntb[0]);
+ #endif
+ tristream.Append(o);
+ }
+ tristream.RestartStrip();
+
+
+ }
+#endif \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSGeom.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSGeom.cginc.meta
new file mode 100644
index 00000000..857ba3e7
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSGeom.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 8ab351cd01215a74fbe8f1227faf9487
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSHelperFunctions.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSHelperFunctions.cginc
new file mode 100644
index 00000000..011fe0fe
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSHelperFunctions.cginc
@@ -0,0 +1,395 @@
+void calcNormal(inout XSLighting i)
+{
+ if(_NormalMapMode == 0)
+ {
+ half3 nMap = UnpackScaleNormal(i.normalMap, _BumpScale);
+ half3 detNMap = UnpackScaleNormal(i.detailNormal, _DetailNormalMapScale);
+
+ half3 blendedNormal = lerp(nMap, BlendNormals(nMap, detNMap), i.detailMask.r);
+
+ half3 tspace0 = half3(i.tangent.x, i.bitangent.x, i.normal.x);
+ half3 tspace1 = half3(i.tangent.y, i.bitangent.y, i.normal.y);
+ half3 tspace2 = half3(i.tangent.z, i.bitangent.z, i.normal.z);
+
+ half3 calcedNormal;
+ calcedNormal.x = dot(tspace0, blendedNormal);
+ calcedNormal.y = dot(tspace1, blendedNormal);
+ calcedNormal.z = dot(tspace2, blendedNormal);
+
+ calcedNormal = normalize(calcedNormal);
+ half3 bumpedTangent = cross(i.bitangent, calcedNormal);
+ half3 bumpedBitangent = cross(calcedNormal, bumpedTangent);
+
+ i.normal = calcedNormal;
+ i.tangent = bumpedTangent;
+ i.bitangent = bumpedBitangent;
+ }
+ else
+ {
+ float3 vcol = i.color.rgb * 2 - 1;
+
+ half3 tspace0 = half3(i.tangent.x, i.bitangent.x, i.normal.x);
+ half3 tspace1 = half3(i.tangent.y, i.bitangent.y, i.normal.y);
+ half3 tspace2 = half3(i.tangent.z, i.bitangent.z, i.normal.z);
+
+ half3 calcedNormal;
+ calcedNormal.x = dot(tspace0, vcol);
+ calcedNormal.y = dot(tspace1, vcol);
+ calcedNormal.z = dot(tspace2, vcol);
+
+ //calcedNormal = calcedNormal;
+ i.normal = normalize(calcedNormal);
+ }
+}
+
+void InitializeTextureUVs(
+ #if defined(Geometry)
+ in g2f i,
+ #else
+ in VertexOutput i,
+ #endif
+ inout TextureUV t)
+{
+ #if defined(PatreonEyeTracking)
+ float2 eyeUvOffset = eyeOffsets(i.uv, i.objPos, i.worldPos, i.ntb[0]);
+ i.uv = eyeUvOffset;
+ i.uv1 = eyeUvOffset;
+ #endif
+
+ half2 uvSetAlbedo = (_UVSetAlbedo == 0) ? i.uv : i.uv1;
+ t.albedoUV = TRANSFORM_TEX(uvSetAlbedo, _MainTex);
+
+ half2 uvSetClipMap = (_UVSetClipMap == 0) ? i.uv : i.uv1;
+ t.clipMapUV = TRANSFORM_TEX(uvSetClipMap, _ClipMap);
+
+ half2 uvSetDissolveMap = (_UVSetDissolve == 0) ? i.uv : i.uv1;
+ t.dissolveUV = TRANSFORM_TEX(uvSetDissolveMap, _DissolveTexture);
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ half2 uvSetNormalMap = (_UVSetNormal == 0) ? i.uv : i.uv1;
+ t.normalMapUV = TRANSFORM_TEX(uvSetNormalMap, _BumpMap);
+
+ half2 uvSetEmissionMap = (_UVSetEmission == 0) ? i.uv : i.uv1;
+ t.emissionMapUV = TRANSFORM_TEX(uvSetEmissionMap, _EmissionMap);
+
+ half2 uvSetMetallicGlossMap = (_UVSetMetallic == 0) ? i.uv : i.uv1;
+ t.metallicGlossMapUV = TRANSFORM_TEX(uvSetMetallicGlossMap, _MetallicGlossMap);
+
+ half2 uvSetOcclusion = (_UVSetOcclusion == 0) ? i.uv : i.uv1;
+ t.occlusionUV = TRANSFORM_TEX(uvSetOcclusion, _OcclusionMap);
+
+ half2 uvSetDetailNormal = (_UVSetDetNormal == 0) ? i.uv : i.uv1;
+ t.detailNormalUV = TRANSFORM_TEX(uvSetDetailNormal, _DetailNormalMap);
+
+ half2 uvSetDetailMask = (_UVSetDetMask == 0) ? i.uv : i.uv1;
+ t.detailMaskUV = TRANSFORM_TEX(uvSetDetailMask, _DetailMask);
+
+ half2 uvSetSpecularMap = (_UVSetSpecular == 0) ? i.uv : i.uv1;
+ t.specularMapUV = TRANSFORM_TEX(uvSetSpecularMap, _SpecularMap);
+
+ half2 uvSetThickness = (_UVSetThickness == 0) ? i.uv : i.uv1;
+ t.thicknessMapUV = TRANSFORM_TEX(uvSetThickness, _ThicknessMap);
+
+ half2 uvSetReflectivityMask = (_UVSetReflectivity == 0) ? i.uv : i.uv1;
+ t.reflectivityMaskUV = TRANSFORM_TEX(uvSetReflectivityMask, _ReflectivityMask);
+ #endif
+}
+
+float Remap_Float(float In, float2 InMinMax, float2 OutMinMax)
+{
+ return OutMinMax.x + (In - InMinMax.x) * (OutMinMax.y - OutMinMax.x) / (InMinMax.y - InMinMax.x);
+}
+
+half3 rgb2hsv(half3 c)
+{
+ half4 K = half4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
+ half4 p = lerp(half4(c.bg, K.wz), half4(c.gb, K.xy), step(c.b, c.g));
+ half4 q = lerp(half4(p.xyw, c.r), half4(c.r, p.yzx), step(p.x, c.r));
+
+ float d = q.x - min(q.w, q.y);
+ float e = 1.0e-10;
+ return half3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
+}
+
+half3 hsv2rgb(half3 c)
+{
+ half4 K = half4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
+ half3 p = abs(frac(c.xxx + K.xyz) * 6.0 - K.www);
+ return c.z * lerp(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
+}
+
+void InitializeTextureUVsMerged(
+ #if defined(Geometry)
+ in g2f i,
+ #else
+ in VertexOutput i,
+ #endif
+ inout TextureUV t)
+{
+ half2 uvSetAlbedo = (_UVSetAlbedo == 0) ? i.uv : i.uv1;
+ t.albedoUV = TRANSFORM_TEX(uvSetAlbedo, _MainTex);
+ t.normalMapUV = t.albedoUV;
+ t.emissionMapUV = t.albedoUV;
+ t.metallicGlossMapUV = t.albedoUV;
+ t.occlusionUV = t.albedoUV;
+ t.detailNormalUV = t.albedoUV;
+ t.detailMaskUV = t.albedoUV;
+ t.specularMapUV = t.albedoUV;
+ t.thicknessMapUV = t.albedoUV;
+ t.reflectivityMaskUV = t.albedoUV;
+ t.clipMapUV = t.albedoUV;
+
+ //Dissolve map makes sense to be on a sep. UV always.
+ half2 uvSetDissolveMap = (_UVSetDissolve == 0) ? i.uv : i.uv1;
+ t.dissolveUV = TRANSFORM_TEX(uvSetDissolveMap, _DissolveTexture);
+}
+
+bool IsInMirror()
+{
+ return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f;
+}
+
+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 screenPos)
+{
+ half dither = Dither8x8Bayer(fmod(screenPos.x, 8), fmod(screenPos.y, 8));
+ return dither;
+}
+
+half2 calcScreenUVs(half4 screenPos)
+{
+ half2 uv = screenPos / (screenPos.w + 0.0000000001); //0.0x1 Stops division by 0 warning in console.
+ #if UNITY_SINGLE_PASS_STEREO
+ uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y);
+ #else
+ uv.xy *= _ScreenParams.xy;
+ #endif
+
+ return uv;
+}
+
+half3 calcViewDir(half3 worldPos)
+{
+ half3 viewDir = _WorldSpaceCameraPos - worldPos;
+ return normalize(viewDir);
+}
+
+half3 calcStereoViewDir(half3 worldPos)
+{
+ #if UNITY_SINGLE_PASS_STEREO
+ half3 cameraPos = half3((unity_StereoWorldSpaceCameraPos[0]+ unity_StereoWorldSpaceCameraPos[1])*.5);
+ #else
+ half3 cameraPos = _WorldSpaceCameraPos;
+ #endif
+ half3 viewDir = cameraPos - worldPos;
+ return normalize(viewDir);
+}
+
+half2 matcapSample(half3 worldUp, half3 viewDirection, half3 normalDirection)
+{
+ half3 worldViewUp = normalize(worldUp - viewDirection * dot(viewDirection, worldUp));
+ half3 worldViewRight = normalize(cross(viewDirection, worldViewUp));
+ half2 matcapUV = half2(dot(worldViewRight, normalDirection), dot(worldViewUp, normalDirection)) * 0.5 + 0.5;
+ return matcapUV;
+}
+ //Reflection direction, worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax
+half3 getReflectionUV(half3 direction, half3 position, half4 cubemapPosition, half3 boxMin, half3 boxMax)
+{
+ #if UNITY_SPECCUBE_BOX_PROJECTION
+ if (cubemapPosition.w > 0) {
+ half3 factors = ((direction > 0 ? boxMax : boxMin) - position) / direction;
+ half scalar = min(min(factors.x, factors.y), factors.z);
+ direction = direction * scalar + (position - cubemapPosition);
+ }
+ #endif
+ return direction;
+}
+
+half3 getEnvMap(XSLighting i, DotProducts d, float blur, half3 reflDir, half3 indirectLight, half3 wnormal)
+{//This function handls Unity style reflections, Matcaps, and a baked in fallback cubemap.
+ half3 envMap = half3(0,0,0);
+
+ #if defined(UNITY_PASS_FORWARDBASE) //Indirect PBR specular should only happen in the forward base pass. Otherwise each extra light adds another indirect sample, which could mean you're getting too much light.
+ half3 reflectionUV1 = getReflectionUV(reflDir, i.worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax);
+ half4 probe0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectionUV1, blur);
+ half3 probe0sample = DecodeHDR(probe0, unity_SpecCube0_HDR);
+
+ half3 indirectSpecular;
+ half interpolator = unity_SpecCube0_BoxMin.w;
+
+ UNITY_BRANCH
+ if (interpolator < 0.99999)
+ {
+ half3 reflectionUV2 = getReflectionUV(reflDir, i.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax);
+ half4 probe1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, reflectionUV2, blur);
+ half3 probe1sample = DecodeHDR(probe1, unity_SpecCube1_HDR);
+ indirectSpecular = lerp(probe1sample, probe0sample, interpolator);
+ }
+ else
+ {
+ indirectSpecular = probe0sample;
+ }
+
+ envMap = indirectSpecular;
+ #endif
+
+ return envMap;
+}
+
+float AlphaAdjust(float alphaToAdj, float3 vColor)
+{
+ _ClipAgainstVertexColorGreaterZeroFive = saturate(_ClipAgainstVertexColorGreaterZeroFive); //So the lerp doesn't go crazy
+ _ClipAgainstVertexColorLessZeroFive = saturate(_ClipAgainstVertexColorLessZeroFive);
+
+ float modR = vColor.r < 0.5 ? _ClipAgainstVertexColorLessZeroFive.r : _ClipAgainstVertexColorGreaterZeroFive.r;
+ float modG = vColor.g < 0.5 ? _ClipAgainstVertexColorLessZeroFive.g : _ClipAgainstVertexColorGreaterZeroFive.g;
+ float modB = vColor.b < 0.5 ? _ClipAgainstVertexColorLessZeroFive.b : _ClipAgainstVertexColorGreaterZeroFive.b;
+
+ alphaToAdj *= lerp(0, 1, lerp(1, modR, step(0.01, vColor.r)));
+ alphaToAdj *= lerp(0, 1, lerp(1, modG, step(0.01, vColor.g)));
+ alphaToAdj *= lerp(0, 1, lerp(1, modB, step(0.01, vColor.b)));
+
+ return alphaToAdj;
+}
+
+void calcDissolve(inout XSLighting i, inout float4 col)
+{
+ #ifdef _ALPHATEST_ON
+ half dissolveAmt = Remap_Float(i.dissolveMask.x, float2(0,1), float2(0.1, 0.9));
+ half dissolveProgress = saturate(_DissolveProgress + lerp(0, 1-AlphaAdjust(1, i.clipMap.rgb), _UseClipsForDissolve));
+ half dissolve = 0;
+ if (_DissolveCoordinates == 0)
+ {
+ dissolve = dissolveAmt - dissolveProgress;
+ clip(dissolve);
+ }
+
+ if(_DissolveCoordinates == 1)
+ {
+ half distToCenter = 1-length(i.objPos);
+ dissolve = ((distToCenter + dissolveAmt) * 0.5) - dissolveProgress;
+ clip(dissolve);
+ }
+
+ if(_DissolveCoordinates == 2)
+ {
+ half distToCenter = (1-i.objPos.y) * 0.5 + 0.5;
+ dissolve = ((distToCenter + dissolveAmt) * 0.5) - dissolveProgress;
+ clip(dissolve);
+ }
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ float4 dissCol = _DissolveColor;
+ dissCol.rgb = rgb2hsv(dissCol.rgb);
+ dissCol.x += fmod(_Hue, 360);
+ dissCol.y = saturate(dissCol.y * _Saturation);
+ dissCol.z *= _Value;
+ dissCol.rgb = hsv2rgb(dissCol.rgb);
+
+ half dissolveEdge = smoothstep(dissolve, dissolve - (_DissolveStrength * 0.01), dissolve * dissolveAmt);
+ col.rgb += (1-dissolveEdge) * dissCol.rgb;
+ #endif
+ #endif
+}
+
+void calcAlpha(inout XSLighting i)
+{
+ i.alpha = 1;
+
+ #ifdef _ALPHABLEND_ON
+ i.alpha = i.albedo.a;
+
+ #ifdef UNITY_PASS_SHADOWCASTER
+ half dither = calcDither(i.screenUV.xy);
+ clip(i.alpha - dither);
+ #endif
+ #endif
+
+ #ifdef _ALPHATEST_ON
+ float modifiedAlpha = lerp(AlphaAdjust(i.albedo.a, i.clipMap.rgb), i.albedo.a, _UseClipsForDissolve);
+ if(_BlendMode >= 3)
+ {
+ half dither = calcDither(i.screenUV.xy);
+ i.alpha = modifiedAlpha - (dither * (1-i.albedo.a) * 0.15);
+ }
+
+ if(_BlendMode == 2)
+ {
+ half dither = calcDither(i.screenUV.xy);
+ float fadeDist = abs(_FadeDitherDistance);
+ float d = distance(_WorldSpaceCameraPos, i.worldPos);
+ d = smoothstep(fadeDist, fadeDist + 0.05, d);
+ d = lerp(d, 1-d, saturate(step(0, _FadeDitherDistance)));
+ dither += lerp(0, d, saturate(_FadeDither));
+ clip(modifiedAlpha - dither);
+ }
+
+ if(_BlendMode == 1)
+ {
+ clip(modifiedAlpha - _Cutoff);
+ }
+ #endif
+}
+
+// //Halftone functions, finish implementing later.. Not correct right now.
+float2 SphereUV( float3 coords /*viewDir?*/)
+{
+ float3 nc = normalize(coords);
+ float lat = acos(nc.y);
+ float lon = atan2(nc.z, nc.x);
+ float2 coord = 1.0 - (float2(lon, lat) * float2(1.0/UNITY_PI, 1.0/UNITY_PI));
+ return (coord + float4(0, 1-unity_StereoEyeIndex,1,1.0).xy) * float4(0, 1-unity_StereoEyeIndex,1,1.0).zw;
+}
+
+half2 rotateUV(half2 uv, half rotation)
+{
+ half mid = 0.5;
+ return half2(
+ cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid,
+ cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid
+ );
+}
+
+half DotHalftone(XSLighting i, half scalar) //Scalar can be anything from attenuation to a dot product
+{
+ bool inMirror = IsInMirror();
+ half2 uv = SphereUV(calcViewDir(i.worldPos));
+ uv.xy *= _HalftoneDotAmount;
+ half2 nearest = 2 * frac(100 * uv) - 1;
+ half dist = length(nearest);
+ half dotSize = 100 * _HalftoneDotSize * scalar;
+ half dotMask = step(dotSize, dist);
+
+ return lerp(1, 1-dotMask, smoothstep(0, 0.4, 1/distance(i.worldPos, _WorldSpaceCameraPos)));;
+}
+
+half LineHalftone(XSLighting i, half scalar)
+{
+ // #if defined(DIRECTIONAL)
+ // scalar = saturate(scalar + ((1-i.attenuation) * 0.2));
+ // #endif
+ bool inMirror = IsInMirror();
+ half2 uv = SphereUV(calcViewDir(i.worldPos));
+ uv = rotateUV(uv, -0.785398);
+ uv.x = sin(uv.x * _HalftoneLineAmount * scalar);
+
+ half2 steppedUV = smoothstep(0,0.2,uv.x);
+ half lineMask = lerp(1, steppedUV, smoothstep(0, 0.4, 1/distance(i.worldPos, _WorldSpaceCameraPos)));
+
+ return saturate(lineMask);
+}
+// \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSHelperFunctions.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSHelperFunctions.cginc.meta
new file mode 100644
index 00000000..0177033b
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSHelperFunctions.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: ebd21331063545043946502d33e9244f
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLighting.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLighting.cginc
new file mode 100644
index 00000000..fead4f8d
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLighting.cginc
@@ -0,0 +1,118 @@
+half4 BRDF_XSLighting(XSLighting i)
+{
+ float3 untouchedNormal = i.normal;
+ i.tangent = normalize(i.tangent);
+ i.bitangent = normalize(i.bitangent);
+ calcNormal(i);
+
+ half3 indirectDiffuse = calcIndirectDiffuse(i);
+ bool lightEnv = any(_WorldSpaceLightPos0.xyz);
+ half3 lightDir = calcLightDir(i);
+ half3 viewDir = calcViewDir(i.worldPos);
+ half3 stereoViewDir = calcStereoViewDir(i.worldPos);
+ half4 metallicSmoothness = calcMetallicSmoothness(i);
+ half3 halfVector = normalize(lightDir + viewDir);
+ half3 reflView = calcReflView(viewDir, i.normal);
+ half3 reflLight = calcReflLight(lightDir, i.normal);
+ half3 reflViewAniso = getAnisotropicReflectionVector(viewDir, i.bitangent, i.tangent, i.normal, metallicSmoothness.a, _AnisotropicReflection);
+
+ DotProducts d = (DotProducts)0;
+ d.ndl = dot(i.normal, lightDir);
+ d.vdn = abs(dot(viewDir, i.normal));
+ d.vdh = DotClamped(viewDir, halfVector);
+ d.tdh = dot(i.tangent, halfVector);
+ d.bdh = dot(i.bitangent, halfVector);
+ d.ndh = DotClamped(i.normal, halfVector);
+ d.rdv = saturate(dot(reflLight, float4(-viewDir, 0)));
+ d.ldh = DotClamped(lightDir, halfVector);
+ d.svdn = abs(dot(stereoViewDir, i.normal));
+
+ i.albedo.rgb = rgb2hsv(i.albedo.rgb);
+ i.albedo.x += fmod(lerp(0, _Hue, i.hsvMask.r), 360);
+ i.albedo.y = saturate(i.albedo.y * lerp(1, _Saturation, i.hsvMask.g));
+ i.albedo.z *= lerp(1, _Value, i.hsvMask.b);
+ i.albedo.rgb = hsv2rgb(i.albedo.rgb);
+
+ i.diffuseColor.rgb = i.albedo.rgb;
+ i.albedo.rgb *= (1-metallicSmoothness.x);
+ half occlusion = lerp(1, i.occlusion.r, _OcclusionIntensity);
+ indirectDiffuse *= lerp(occlusion, 1, _OcclusionMode);
+
+ half4 lightCol = half4(0,0,0,0);
+ calcLightCol(lightEnv, indirectDiffuse, lightCol);
+
+ float3 vertexLightDiffuse = 0;
+ float3 vertexLightSpec = 0;
+ #if defined(VERTEXLIGHT_ON)
+ VertexLightInformation vLight = (VertexLightInformation)0;
+ float4 vertexLightAtten = float4(0,0,0,0);
+ float3 vertexLightColor = get4VertexLightsColFalloff(vLight, i.worldPos, i.normal, vertexLightAtten);
+ float3 vertexLightDir = getVertexLightsDir(vLight, i.worldPos, vertexLightAtten);
+ vertexLightDiffuse = getVertexLightsDiffuse(i, vLight);
+ indirectDiffuse += vertexLightDiffuse;
+
+ vertexLightSpec = getVertexLightSpecular(i, d, vLight, i.normal, viewDir, _AnisotropicSpecular) * occlusion;
+ #endif
+
+ half lightAvg = (dot(indirectDiffuse.rgb, grayscaleVec) + dot(lightCol.rgb, grayscaleVec)) / 2;
+ half3 envMapBlurred = getEnvMap(i, d, 5, reflView, indirectDiffuse, i.normal);
+
+ half4 ramp = calcRamp(i,d);
+ half4 diffuse = calcDiffuse(i, d, indirectDiffuse, lightCol, ramp);
+ half4 rimLight = calcRimLight(i, d, lightCol, indirectDiffuse, envMapBlurred);
+ half4 shadowRim = calcShadowRim(i, d, indirectDiffuse);
+
+ float3 f0 = 0.16 * _Reflectivity * _Reflectivity * (1.0 - metallicSmoothness.r) + i.diffuseColor * metallicSmoothness.r;
+ float3 fresnel = F_Schlick(d.vdn, f0);
+ half3 indirectSpecular = calcIndirectSpecular(i, d, metallicSmoothness, reflViewAniso, indirectDiffuse, viewDir, fresnel, ramp) * occlusion;
+ half3 directSpecular = calcDirectSpecular(i, d.ndl, d.ndh, d.vdn, d.ldh, lightCol, halfVector, _AnisotropicSpecular) * d.ndl * occlusion * i.attenuation;
+ half4 subsurface = calcSubsurfaceScattering(i, d, lightDir, viewDir, i.normal, lightCol, indirectDiffuse);
+ half4 outlineColor = calcOutlineColor(i, d, indirectDiffuse, lightCol);
+
+ half lineHalftone = 0;
+ half stipplingDirect = 0;
+ half stipplingRim = 0;
+ half stipplingIndirect = 0;
+ bool usingLineHalftone = 0;
+ if(_HalftoneType == 0 || _HalftoneType == 2)
+ {
+ lineHalftone = lerp(1, LineHalftone(i, 1), 1-saturate(dot(shadowRim * ramp, grayscaleVec)));
+ usingLineHalftone = 1;
+ }
+
+ if(_HalftoneType == 1 || _HalftoneType == 2)
+ {
+ stipplingDirect = DotHalftone(i, saturate(dot(directSpecular, grayscaleVec))) * saturate(dot(shadowRim * ramp, grayscaleVec));
+ stipplingRim = DotHalftone(i, saturate(dot(rimLight, grayscaleVec))) * saturate(dot(shadowRim * ramp, grayscaleVec));
+ stipplingIndirect = DotHalftone(i, saturate(dot(indirectSpecular, grayscaleVec))) * saturate(dot(shadowRim * ramp, grayscaleVec));
+
+ directSpecular *= stipplingDirect;
+ rimLight *= stipplingRim;
+ indirectSpecular *= lerp(0.5, 1, stipplingIndirect); // Don't want these to go completely black, looks weird
+ }
+
+ #if defined(_COLOROVERLAY_ON)
+ float refractFresnel = 1-d.vdn;
+ float distanceToPixel = distance(_WorldSpaceCameraPos, i.worldPos);
+ float distanceScalar = saturate(1 / distanceToPixel) * saturate(distanceToPixel);
+ float3 refractDir = refract(viewDir, i.normal, max(0, _IOR - 1) * 0.03 * distanceScalar * refractFresnel);
+ float3x3 worldToTangentMatrix = float3x3(i.tangent, i.bitangent, i.normal);
+ refractDir = mul(worldToTangentMatrix, refractDir);
+ float4 backgroundColor = tex2Dproj(_GrabTexture, float4(i.screenPos.xyz + refractDir, i.screenPos.w));
+ #endif
+
+ half4 col;
+ #if !defined(_COLOROVERLAY_ON)
+ col = diffuse * shadowRim;
+ #else
+ col = backgroundColor * diffuse * shadowRim;
+ #endif
+ calcReflectionBlending(i, col, indirectSpecular.xyzz);
+ col += max(directSpecular.xyzz, rimLight);
+ col.rgb += max(vertexLightSpec.rgb, rimLight);
+ col += subsurface;
+ calcClearcoat(col, i, d, untouchedNormal, indirectDiffuse, lightCol, viewDir, lightDir, ramp);
+ col += calcEmission(i, lightAvg);
+ float4 finalColor = lerp(col, outlineColor, i.isOutline) * lerp(1, lineHalftone, _HalftoneLineIntensity * usingLineHalftone);
+ return finalColor;
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLighting.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLighting.cginc.meta
new file mode 100644
index 00000000..b11ced2b
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLighting.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 786da05e6d64ae844853fdca78e33aef
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLightingFunctions.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLightingFunctions.cginc
new file mode 100644
index 00000000..f28f6f29
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLightingFunctions.cginc
@@ -0,0 +1,428 @@
+//Helper Functions for Reflections
+float pow5(float a)
+{
+ return a * a * a * a * a;
+}
+
+float3 F_Schlick(float u, float3 f0)
+{
+ return f0 + (1.0 - f0) * pow(1.0 - u, 5.0);
+}
+
+float3 F_FresnelLerp (float3 F0, float3 F90, float cosA)
+{
+ float t = pow5(1 - cosA); // ala Schlick interpoliation
+ return lerp (F0, F90, t);
+}
+
+float D_GGX(float NoH, float roughness)
+{
+ float a2 = roughness * roughness;
+ float f = (NoH * a2 - NoH) * NoH + 1.0;
+ return a2 / (UNITY_PI * f * f);
+}
+
+float D_GGX_Anisotropic(float NoH, const float3 h, const float3 t, const float3 b, float at, float ab)
+{
+ float ToH = dot(t, h);
+ float BoH = dot(b, h);
+ float a2 = at * ab;
+ float3 v = float3(ab * ToH, at * BoH, a2 * NoH);
+ float v2 = dot(v, v);
+ float w2 = a2 / v2;
+ return a2 * w2 * w2 * (1.0 / UNITY_PI);
+}
+
+float V_SmithGGXCorrelated(float NoV, float NoL, float a)
+{
+ float a2 = a * a;
+ float GGXL = NoV * sqrt((-NoL * a2 + NoL) * NoL + a2);
+ float GGXV = NoL * sqrt((-NoV * a2 + NoV) * NoV + a2);
+ return 0.5 / (GGXV + GGXL);
+}
+
+half3 calcReflView(half3 viewDir, half3 normal)
+{
+ return reflect(-viewDir, normal);
+}
+
+half3 calcReflLight(half3 lightDir, half3 normal)
+{
+ return reflect(lightDir, normal);
+}
+//
+
+//Returns the average direction of all lights and writes to a struct contraining individual directions
+float3 getVertexLightsDir(inout VertexLightInformation vLights, float3 worldPos, float4 vertexLightAtten)
+{
+ float3 dir = float3(0,0,0);
+ float3 toLightX = float3(unity_4LightPosX0.x, unity_4LightPosY0.x, unity_4LightPosZ0.x);
+ float3 toLightY = float3(unity_4LightPosX0.y, unity_4LightPosY0.y, unity_4LightPosZ0.y);
+ float3 toLightZ = float3(unity_4LightPosX0.z, unity_4LightPosY0.z, unity_4LightPosZ0.z);
+ float3 toLightW = float3(unity_4LightPosX0.w, unity_4LightPosY0.w, unity_4LightPosZ0.w);
+
+ float3 dirX = toLightX - worldPos;
+ float3 dirY = toLightY - worldPos;
+ float3 dirZ = toLightZ - worldPos;
+ float3 dirW = toLightW - worldPos;
+
+ dirX *= length(toLightX) * vertexLightAtten.x;
+ dirY *= length(toLightY) * vertexLightAtten.y;
+ dirZ *= length(toLightZ) * vertexLightAtten.z;
+ dirW *= length(toLightW) * vertexLightAtten.w;
+
+ vLights.Direction[0] = dirX;
+ vLights.Direction[1] = dirY;
+ vLights.Direction[2] = dirZ;
+ vLights.Direction[3] = dirW;
+
+ dir = (dirX + dirY + dirZ + dirW) / 4;
+ return dir;
+}
+
+// Get the most intense light Dir from probes OR from a light source. Method developed by Xiexe / Merlin
+half3 calcLightDir(XSLighting i)
+{
+ half3 lightDir = UnityWorldSpaceLightDir(i.worldPos);
+ half3 probeLightDir = unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz;
+ lightDir = (lightDir + probeLightDir); //Make light dir the average of the probe direction and the light source direction.
+ #if !defined(POINT) && !defined(SPOT)// if the average length of the light probes is null, and we don't have a directional light in the scene, fall back to our fallback lightDir
+ if(length(unity_SHAr.xyz*unity_SHAr.w + unity_SHAg.xyz*unity_SHAg.w + unity_SHAb.xyz*unity_SHAb.w) == 0 && length(lightDir) < 0.1)
+ {
+ lightDir = half4(1, 1, 1, 0);
+ }
+ #endif
+ return normalize(lightDir);
+}
+
+void calcLightCol(bool lightEnv, inout half3 indirectDiffuse, inout half4 lightColor)
+{
+ //If we're in an environment with a realtime light, then we should use the light color, and indirect color raw.
+ //...
+ if(lightEnv)
+ {
+ lightColor = _LightColor0;
+ indirectDiffuse = indirectDiffuse;
+ }
+ else
+ {
+ lightColor = indirectDiffuse.xyzz * 0.6; // ...Otherwise
+ indirectDiffuse = indirectDiffuse * 0.4; // Keep overall light to 100% - these should never go over 100%
+ // ex. If we have indirect 100% as the light color and Indirect 50% as the indirect color,
+ // we end up with 150% of the light from the scene.
+ }
+}
+
+float3 get4VertexLightsColFalloff(inout VertexLightInformation vLight, float3 worldPos, float3 normal, inout float4 vertexLightAtten)
+{
+ float3 lightColor = 0;
+ #if defined(VERTEXLIGHT_ON)
+ float4 toLightX = unity_4LightPosX0 - worldPos.x;
+ float4 toLightY = unity_4LightPosY0 - worldPos.y;
+ float4 toLightZ = unity_4LightPosZ0 - worldPos.z;
+
+ float4 lengthSq = 0;
+ lengthSq += toLightX * toLightX;
+ lengthSq += toLightY * toLightY;
+ lengthSq += toLightZ * toLightZ;
+
+ float4 atten = 1.0 / (1.0 + lengthSq * unity_4LightAtten0);
+ float4 atten2 = saturate(1 - (lengthSq * unity_4LightAtten0 / 25));
+ atten = min(atten, atten2 * atten2);
+ // Cleaner, nicer looking falloff. Also prevents the "Snapping in" effect that Unity's normal integration of vertex lights has.
+ vertexLightAtten = atten;
+
+ lightColor.rgb += unity_LightColor[0] * atten.x;
+ lightColor.rgb += unity_LightColor[1] * atten.y;
+ lightColor.rgb += unity_LightColor[2] * atten.z;
+ lightColor.rgb += unity_LightColor[3] * atten.w;
+
+ vLight.ColorFalloff[0] = unity_LightColor[0] * atten.x;
+ vLight.ColorFalloff[1] = unity_LightColor[1] * atten.y;
+ vLight.ColorFalloff[2] = unity_LightColor[2] * atten.z;
+ vLight.ColorFalloff[3] = unity_LightColor[3] * atten.w;
+
+ vLight.Attenuation[0] = atten.x;
+ vLight.Attenuation[1] = atten.y;
+ vLight.Attenuation[2] = atten.z;
+ vLight.Attenuation[3] = atten.w;
+ #endif
+ return lightColor;
+}
+
+half4 calcRamp(XSLighting i, DotProducts d)
+{
+ half remapRamp;
+ remapRamp = (d.ndl * 0.5 + 0.5) * lerp(1, i.occlusion.r, _OcclusionMode) ;
+ #if defined(UNITY_PASS_FORWARDBASE)
+ remapRamp *= i.attenuation;
+ #endif
+ half4 ramp = tex2D(_Ramp, half2(remapRamp, i.rampMask.r));
+ return ramp;
+}
+
+half4 calcRampShadowOverride(XSLighting i, float ndl)
+{
+ half remapRamp;
+ remapRamp = (ndl * 0.5 + 0.5) * lerp(1, i.occlusion.r, _OcclusionMode);
+ half4 ramp = tex2D(_Ramp, half2(remapRamp, i.rampMask.r));
+ return ramp;
+}
+
+float3 getVertexLightsDiffuse(XSLighting i, VertexLightInformation vLight)
+{
+ float3 vertexLightsDiffuse = 0;
+ #if defined(VERTEXLIGHT_ON)
+ for(int light = 0; light < 4; light++) // I know, I know, not using i. Blame my structs.
+ {
+ float vLightNdl = dot(vLight.Direction[light], i.normal);
+ vertexLightsDiffuse += calcRampShadowOverride(i, vLightNdl) * vLight.ColorFalloff[light];
+ }
+ #endif
+ return vertexLightsDiffuse;
+}
+
+half4 calcMetallicSmoothness(XSLighting i)
+{
+ half roughness = 1-(_Glossiness * i.metallicGlossMap.a);
+ roughness *= 1.7 - 0.7 * roughness;
+ half metallic = lerp(0, i.metallicGlossMap.r * _Metallic, i.reflectivityMask.r);
+ return half4(metallic, 0, 0, roughness);
+}
+
+half4 calcRimLight(XSLighting i, DotProducts d, half4 lightCol, half3 indirectDiffuse, half3 envMap)
+{
+ half rimIntensity = saturate((1-d.svdn)) * pow(d.ndl, _RimThreshold);
+ rimIntensity = smoothstep(_RimRange - _RimSharpness, _RimRange + _RimSharpness, rimIntensity);
+ half4 rim = rimIntensity * _RimIntensity * (lightCol + indirectDiffuse.xyzz);
+ rim *= lerp(1, i.attenuation + indirectDiffuse.xyzz, _RimAttenEffect);
+ return rim * _RimColor * lerp(1, i.diffuseColor.rgbb, _RimAlbedoTint) * lerp(1, envMap.rgbb, _RimCubemapTint);
+}
+
+half4 calcShadowRim(XSLighting i, DotProducts d, half3 indirectDiffuse)
+{
+ half rimIntensity = saturate((1-d.svdn)) * pow(1-d.ndl, _ShadowRimThreshold * 2);
+ rimIntensity = smoothstep(_ShadowRimRange - _ShadowRimSharpness, _ShadowRimRange + _ShadowRimSharpness, rimIntensity);
+ half4 shadowRim = lerp(1, (_ShadowRim * lerp(1, i.diffuseColor.rgbb, _ShadowRimAlbedoTint)) + (indirectDiffuse.xyzz * 0.1), rimIntensity);
+
+ return shadowRim ;
+}
+
+float3 getAnisotropicReflectionVector(float3 viewDir, float3 bitangent, float3 tangent, float3 normal, float roughness, float anisotropy)
+{
+ //_Anisotropy = lerp(-0.2, 0.2, sin(_Time.y / 20)); //This is pretty fun
+ float3 anisotropicDirection = anisotropy >= 0.0 ? bitangent : tangent;
+ float3 anisotropicTangent = cross(anisotropicDirection, viewDir);
+ float3 anisotropicNormal = cross(anisotropicTangent, anisotropicDirection);
+ float bendFactor = abs(anisotropy) * saturate(5.0 * roughness);
+ float3 bentNormal = normalize(lerp(normal, anisotropicNormal, bendFactor));
+ return reflect(-viewDir, bentNormal);
+}
+
+half3 calcDirectSpecular(XSLighting i, float ndl, float ndh, float vdn, float ldh, half4 lightCol, half3 halfVector, half anisotropy)
+{
+ half specularIntensity = _SpecularIntensity * i.specularMap.r;
+ half3 specular = half3(0,0,0);
+ half smoothness = max(0.01, (_SpecularArea * i.specularMap.b));
+ smoothness *= 1.7 - 0.7 * smoothness;
+
+ float rough = max(smoothness * smoothness, 0.0045);
+ float Dn = D_GGX(ndh, rough);
+ float3 F = 1-F_Schlick(ldh, 0);
+ float V = V_SmithGGXCorrelated(vdn, ndl, rough);
+ float3 directSpecularNonAniso = max(0, (Dn * V) * F);
+
+ anisotropy *= saturate(5.0 * smoothness);
+ float at = max(rough * (1.0 + anisotropy), 0.001);
+ float ab = max(rough * (1.0 - anisotropy), 0.001);
+ float D = D_GGX_Anisotropic(ndh, halfVector, i.tangent, i.bitangent, at, ab);
+ float3 directSpecularAniso = max(0, (D * V) * F);
+
+ specular = lerp(directSpecularNonAniso, directSpecularAniso, saturate(abs(anisotropy * 100)));
+ specular = lerp(specular, smoothstep(0.5, 0.51, specular), _SpecularSharpness) * 3 * lightCol * specularIntensity; // Multiply by 3 to bring up to brightness of standard
+ specular *= lerp(1, i.diffuseColor, _SpecularAlbedoTint * i.specularMap.g);
+ return specular;
+}
+
+float3 getVertexLightSpecular(XSLighting i, DotProducts d, VertexLightInformation vLight, float3 normal, float3 viewDir, float anisotropy)
+{
+ float3 vertexLightSpec = 0;
+ #if defined(VERTEXLIGHT_ON)
+ for(int light = 0; light < 4; light++)
+ {
+ // All of these need to be recalculated for each individual light to treat them how we want to treat them.
+ float3 vHalfVector = normalize(vLight.Direction[light] + viewDir);
+ float vNDL = saturate(dot(vLight.Direction[light], normal));
+ float vLDH = saturate(dot(vLight.Direction[light], vHalfVector));
+ float vNDH = saturate(dot(normal, vHalfVector));
+ vertexLightSpec += calcDirectSpecular(i, vNDL, vNDH, d.vdn, vLDH, vLight.ColorFalloff[light].rgbb, vHalfVector, anisotropy) * vNDL;
+ }
+ #endif
+ return vertexLightSpec;
+}
+
+half3 calcIndirectSpecular(XSLighting i, DotProducts d, half4 metallicSmoothness, half3 reflDir, half3 indirectLight, half3 viewDir, float3 fresnel, half4 ramp)
+{//This function handls Unity style reflections, Matcaps, and a baked in fallback cubemap.
+ half3 spec = half3(0,0,0);
+
+ UNITY_BRANCH
+ if(_ReflectionMode == 0) // PBR
+ {
+ #if defined(UNITY_PASS_FORWARDBASE) //Indirect PBR specular should only happen in the forward base pass. Otherwise each extra light adds another indirect sample, which could mean you're getting too much light.
+ half3 reflectionUV1 = getReflectionUV(reflDir, i.worldPos, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax);
+ half4 probe0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectionUV1, metallicSmoothness.w * UNITY_SPECCUBE_LOD_STEPS);
+ half3 probe0sample = DecodeHDR(probe0, unity_SpecCube0_HDR);
+
+ half3 indirectSpecular;
+ half interpolator = unity_SpecCube0_BoxMin.w;
+
+ UNITY_BRANCH
+ if (interpolator < 0.99999)
+ {
+ half3 reflectionUV2 = getReflectionUV(reflDir, i.worldPos, unity_SpecCube1_ProbePosition, unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax);
+ half4 probe1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, reflectionUV2, metallicSmoothness.w * UNITY_SPECCUBE_LOD_STEPS);
+ half3 probe1sample = DecodeHDR(probe1, unity_SpecCube1_HDR);
+ indirectSpecular = lerp(probe1sample, probe0sample, interpolator);
+ }
+ else
+ {
+ indirectSpecular = probe0sample;
+ }
+
+ if (!any(indirectSpecular))
+ {
+ indirectSpecular = texCUBElod(_BakedCubemap, half4(reflDir, metallicSmoothness.w * UNITY_SPECCUBE_LOD_STEPS));
+ indirectSpecular *= indirectLight;
+ }
+ spec = indirectSpecular * fresnel;
+ #endif
+ }
+ else if(_ReflectionMode == 1) //Baked Cubemap
+ {
+ half3 indirectSpecular = texCUBElod(_BakedCubemap, half4(reflDir, metallicSmoothness.w * UNITY_SPECCUBE_LOD_STEPS));;
+ spec = indirectSpecular * fresnel;
+
+ if(_ReflectionBlendMode != 1)
+ {
+ spec *= (indirectLight + (_LightColor0 * i.attenuation) * 0.5);
+ }
+ }
+ else if (_ReflectionMode == 2) //Matcap
+ {
+ half3 upVector = half3(0,1,0);
+ half2 remapUV = matcapSample(upVector, viewDir, i.normal);
+ spec = tex2Dlod(_Matcap, half4(remapUV, 0, ((1-metallicSmoothness.w) * UNITY_SPECCUBE_LOD_STEPS))) * _MatcapTint;
+
+ if(_ReflectionBlendMode != 1)
+ {
+ spec *= (indirectLight + (_LightColor0 * i.attenuation) * 0.5);
+ }
+
+ spec *= lerp(1, i.diffuseColor, _MatcapTintToDiffuse);
+ }
+ return spec;
+}
+
+half4 calcOutlineColor(XSLighting i, DotProducts d, half3 indirectDiffuse, half4 lightCol)
+{
+ half3 outlineColor = half3(0,0,0);
+ #if defined(Geometry)
+ half3 ol = lerp(_OutlineColor, _OutlineColor * i.diffuseColor, _OutlineAlbedoTint);
+ outlineColor = ol * saturate(i.attenuation * d.ndl) * lightCol.rgb;
+ outlineColor += indirectDiffuse * ol;
+ outlineColor = lerp(outlineColor, ol, _OutlineLighting);
+ #endif
+ return half4(outlineColor,1);
+}
+
+half3 calcIndirectDiffuse(XSLighting i)
+{// We don't care about anything other than the color from probes for toon lighting.
+ half3 indirectDiffuse = ShadeSH9(float4(0,0.5,0,1));//half3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w);
+ return indirectDiffuse;
+}
+
+half4 calcDiffuse(XSLighting i, DotProducts d, half3 indirectDiffuse, half4 lightCol, half4 ramp)
+{
+ half4 diffuse;
+ half4 indirect = indirectDiffuse.xyzz;
+
+ half grayIndirect = dot(indirectDiffuse, float3(1,1,1));
+ half attenFactor = lerp(i.attenuation, 1, smoothstep(0, 0.2, grayIndirect));
+
+ diffuse = ramp * attenFactor * lightCol + indirect;
+ diffuse = i.albedo * diffuse;
+ return diffuse;
+}
+
+//Subsurface Scattering - Based on a 2011 GDC Conference from by Colin Barre-Bresebois & Marc Bouchard
+//Modified by Xiexe
+half4 calcSubsurfaceScattering(XSLighting i, DotProducts d, half3 lightDir, half3 viewDir, half3 normal, half4 lightCol, half3 indirectDiffuse)
+{
+ UNITY_BRANCH
+ if(any(_SSColor.rgb)) // Skip all the SSS stuff if the color is 0.
+ {
+ //d.ndl = smoothstep(_SSSRange - _SSSSharpness, _SSSRange + _SSSSharpness, d.ndl);
+ half attenuation = saturate(i.attenuation * (d.ndl * 0.5 + 0.5));
+ half3 H = normalize(lightDir + normal * _SSDistortion);
+ half VdotH = pow(saturate(dot(viewDir, -H)), _SSPower);
+ half3 I = _SSColor * (VdotH + indirectDiffuse) * attenuation * i.thickness * _SSScale;
+ half4 SSS = half4(lightCol.rgb * I * i.albedo.rgb, 1);
+ SSS = max(0, SSS); // Make sure it doesn't go NaN
+
+ return SSS;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+half4 calcEmission(XSLighting i, half lightAvg)
+{
+ #if defined(UNITY_PASS_FORWARDBASE) // Emission only in Base Pass, and vertex lights
+ float4 emission = lerp(i.emissionMap, i.emissionMap * i.diffuseColor.xyzz, _EmissionToDiffuse);
+ float4 scaledEmission = emission * saturate(smoothstep(1-_ScaleWithLightSensitivity, 1+_ScaleWithLightSensitivity, 1-lightAvg));
+ float4 em = lerp(scaledEmission, emission, _ScaleWithLight);
+
+ em.rgb = rgb2hsv(em.rgb);
+ em.x += fmod(_Hue, 360);
+ em.y = saturate(em.y * _Saturation);
+ em.z *= _Value;
+ em.rgb = hsv2rgb(em.rgb);
+
+ return em;
+ #else
+ return 0;
+ #endif
+}
+
+void calcReflectionBlending(XSLighting i, inout half4 col, half3 indirectSpecular)
+{
+ if(_ReflectionBlendMode == 0) // Additive
+ col += indirectSpecular.xyzz * i.reflectivityMask.r;
+ else if(_ReflectionBlendMode == 1) //Multiplicitive
+ col = lerp(col, col * indirectSpecular.xyzz, i.reflectivityMask.r);
+ else if(_ReflectionBlendMode == 2) //Subtractive
+ col -= indirectSpecular.xyzz * i.reflectivityMask.r;
+}
+
+void calcClearcoat(inout half4 col, XSLighting i, DotProducts d, half3 untouchedNormal, half3 indirectDiffuse, half3 lightCol, half3 viewDir, half3 lightDir, half4 ramp)
+{
+ UNITY_BRANCH
+ if(_ClearCoat != 0)
+ {
+ untouchedNormal = normalize(untouchedNormal);
+ half clearcoatSmoothness = _ClearcoatSmoothness * i.metallicGlossMap.g;
+ half clearcoatStrength = _ClearcoatStrength * i.metallicGlossMap.b;
+
+ half3 reflView = calcReflView(viewDir, untouchedNormal);
+ half3 reflLight = calcReflLight(lightDir, untouchedNormal);
+ half rdv = saturate( dot( reflLight, half4(-viewDir, 0) ));
+ half3 clearcoatIndirect = calcIndirectSpecular(i, d, half4(0, 0, 0, 1-clearcoatSmoothness), reflView, indirectDiffuse, viewDir, 1, ramp);
+ half3 clearcoatDirect = saturate(pow(rdv, clearcoatSmoothness * 256)) * i.attenuation * lightCol;
+
+ half3 clearcoat = (clearcoatIndirect + clearcoatDirect) * clearcoatStrength;
+ clearcoat = lerp(clearcoat * 0.5, clearcoat, saturate(pow(1-dot(viewDir, untouchedNormal), 0.8)) );
+ col += clearcoat.xyzz;
+ }
+}
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLightingFunctions.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLightingFunctions.cginc.meta
new file mode 100644
index 00000000..c2e52936
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSLightingFunctions.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 6a2a36080e04c18489c0c9d2ddc2543a
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSShadowCaster.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSShadowCaster.cginc
new file mode 100644
index 00000000..c3baae39
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSShadowCaster.cginc
@@ -0,0 +1,170 @@
+#include "UnityCG.cginc"
+#include "UnityShaderVariables.cginc"
+
+// Do dithering for alpha blended shadows on SM3+/desktop, and Dithered transparency;
+// on lesser systems do simple alpha-tested shadows
+#if defined(_ALPHABLEND_ON) || defined(_ALPHATEST_ON)
+ #if !((SHADER_TARGET < 30) || defined (SHADER_API_MOBILE) || defined(SHADER_API_D3D11_9X) || defined (SHADER_API_PSP2) || defined (SHADER_API_PSM))
+ #define UNITY_STANDARD_USE_DITHER_MASK 1
+ #endif
+#endif
+
+// Need to output UVs in shadow caster, since we need to sample texture and do clip/dithering based on it
+#if defined(_ALPHABLEND_ON) || defined(_ALPHATEST_ON)
+ #define UNITY_STANDARD_USE_SHADOW_UVS 1
+#endif
+
+uniform float4 _ClipAgainstVertexColorGreaterZeroFive, _ClipAgainstVertexColorLessZeroFive;
+uniform float4 _Color;
+uniform float _Cutoff;
+uniform sampler2D _MainTex;
+uniform sampler2D _CutoutMask;
+uniform sampler2D _ClipMap;
+uniform float4 _MainTex_ST;
+uniform float _FadeDither;
+uniform float _FadeDitherDistance;
+uniform int _BlendMode;
+#ifdef UNITY_STANDARD_USE_DITHER_MASK
+ uniform sampler3D _DitherMaskLOD;
+#endif
+
+struct VertexInput
+{
+ float4 vertex : POSITION;
+ float3 normal : NORMAL;
+ float2 uv0 : TEXCOORD0;
+ float4 color : COLOR;
+};
+
+
+// Don't make the structure if it's empty (it's an error to have empty structs on some platforms...)
+#if !defined(V2F_SHADOW_CASTER_NOPOS_IS_EMPTY) || defined(UNITY_STANDARD_USE_SHADOW_UVS)
+struct VertexOutputShadowCaster
+{
+ V2F_SHADOW_CASTER_NOPOS
+ // Need to output UVs in shadow caster, since we need to sample texture and do clip/dithering based on it
+ #if defined(UNITY_STANDARD_USE_SHADOW_UVS)
+ float2 tex : TEXCOORD1;
+ #endif
+
+ float4 worldPos : TEXCOORD2;
+ float4 screenPos : TEXCOORD3;
+ float4 color : COLOR;
+};
+#endif
+
+half2 calcScreenUVs(half4 screenPos)
+{
+ half2 uv = screenPos / (screenPos.w + 0.0000000001); //0.0x1 Stops division by 0 warning in console.
+ #if UNITY_SINGLE_PASS_STEREO
+ uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y);
+ #else
+ uv.xy *= _ScreenParams.xy;
+ #endif
+
+ return uv;
+}
+
+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 screenPos)
+{
+ half dither = Dither8x8Bayer(fmod(screenPos.x, 8), fmod(screenPos.y, 8));
+ return dither;
+}
+
+// We have to do these dances of outputting SV_POSITION separately from the vertex shader,
+// and inputting VPOS in the pixel shader, since they both map to "POSITION" semantic on
+// some platforms, and then things don't go well.
+
+
+void vertShadowCaster(VertexInput v,
+ #if !defined(V2F_SHADOW_CASTER_NOPOS_IS_EMPTY) || defined(UNITY_STANDARD_USE_SHADOW_UVS)
+ out VertexOutputShadowCaster o,
+ #endif
+ out float4 opos : SV_POSITION)
+{
+ TRANSFER_SHADOW_CASTER_NOPOS(o, opos)
+ #if defined(UNITY_STANDARD_USE_SHADOW_UVS)
+ o.tex = TRANSFORM_TEX(v.uv0, _MainTex);
+ o.color = v.color;
+ o.worldPos = mul(unity_ObjectToWorld, v.vertex);
+ o.screenPos = ComputeScreenPos(opos);
+ #endif
+}
+
+float AlphaAdjust(float alphaToAdj, float3 vColor)
+{
+ _ClipAgainstVertexColorGreaterZeroFive = saturate(_ClipAgainstVertexColorGreaterZeroFive); //So the lerp doesn't go crazy
+ _ClipAgainstVertexColorLessZeroFive = saturate(_ClipAgainstVertexColorLessZeroFive);
+
+ float modR = vColor.r < 0.5 ? _ClipAgainstVertexColorLessZeroFive.r : _ClipAgainstVertexColorGreaterZeroFive.r;
+ float modG = vColor.g < 0.5 ? _ClipAgainstVertexColorLessZeroFive.g : _ClipAgainstVertexColorGreaterZeroFive.g;
+ float modB = vColor.b < 0.5 ? _ClipAgainstVertexColorLessZeroFive.b : _ClipAgainstVertexColorGreaterZeroFive.b;
+
+ alphaToAdj *= lerp(0, 1, lerp(1, modR, step(0.01, vColor.r)));
+ alphaToAdj *= lerp(0, 1, lerp(1, modG, step(0.01, vColor.g)));
+ alphaToAdj *= lerp(0, 1, lerp(1, modB, step(0.01, vColor.b)));
+
+ return alphaToAdj;
+}
+
+half4 fragShadowCaster(
+ #if !defined(V2F_SHADOW_CASTER_NOPOS_IS_EMPTY) || defined(UNITY_STANDARD_USE_SHADOW_UVS)
+ VertexOutputShadowCaster i
+ #endif
+ #ifdef UNITY_STANDARD_USE_DITHER_MASK
+ , UNITY_VPOS_TYPE vpos : VPOS
+ #endif
+) : SV_Target
+{
+ #if defined(UNITY_STANDARD_USE_SHADOW_UVS)
+ half alpha = 1;
+ float4 albedo = tex2D(_MainTex, i.tex).a * _Color.a;
+ float4 clipMap = tex2D(_ClipMap, i.tex);
+ float modifiedAlpha = AlphaAdjust(albedo.a, clipMap.rgb);
+
+ #if defined(_ALPHABLEND_ON) || defined(_ALPHATEST_ON)
+ float2 screenUV = calcScreenUVs(i.screenPos);
+ if(_BlendMode >= 3)
+ {
+ half dither = calcDither(screenUV);
+ alpha = modifiedAlpha - (dither * (1-albedo.a) * 0.15);
+ }
+
+ if(_BlendMode == 2)
+ {
+ half dither = calcDither(screenUV);
+
+ float fadeDist = abs(_FadeDitherDistance);
+ float d = distance(_WorldSpaceCameraPos, i.worldPos);
+ d = smoothstep(fadeDist, fadeDist + 0.05, d);
+ d = lerp(d, 1-d, saturate(step(0, _FadeDitherDistance)));
+ dither += lerp(0, d, saturate(_FadeDither));
+ clip(modifiedAlpha - dither);
+ }
+
+ if(_BlendMode == 1)
+ {
+ clip(modifiedAlpha - _Cutoff);
+ }
+ #else
+ alpha = modifiedAlpha;
+ #endif
+ #endif
+
+ SHADOW_CASTER_FRAGMENT(i)
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSShadowCaster.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSShadowCaster.cginc.meta
new file mode 100644
index 00000000..03c14eb0
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSShadowCaster.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: cc6de506a13e7c347814e14820c6f710
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSVert.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSVert.cginc
new file mode 100644
index 00000000..90a36907
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSVert.cginc
@@ -0,0 +1,32 @@
+VertexOutput vert (VertexInput v)
+{
+ VertexOutput o = (VertexOutput)0;
+ float3 wnormal = UnityObjectToWorldNormal(v.normal);
+ float3 tangent = UnityObjectToWorldDir(v.tangent.xyz);
+ half tangentSign = v.tangent.w * unity_WorldTransformParams.w;
+ float3 bitangent = cross(wnormal, tangent) * tangentSign;
+
+ #if defined(Geometry)
+ o.vertex = v.vertex;
+ #endif
+
+ o.pos = UnityObjectToClipPos(v.vertex);
+ o.worldPos = mul(unity_ObjectToWorld, v.vertex);
+ o.ntb[0] = wnormal;
+ o.ntb[1] = tangent;
+ o.ntb[2] = bitangent;
+ o.uv = v.uv;
+ o.uv1 = v.uv1;
+ o.color = float4(v.color.rgb, 0); // store if outline in alpha channel of vertex colors | 0 = not an outline
+ o.normal = v.normal;
+ o.screenPos = ComputeScreenPos(o.pos);
+ o.objPos = normalize(v.vertex);
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ UNITY_TRANSFER_SHADOW(o, o.uv);
+ UNITY_TRANSFER_FOG(o, o.pos);
+ #else
+ TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos);
+ #endif
+ return o;
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSVert.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSVert.cginc.meta
new file mode 100644
index 00000000..d38ab884
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/CGIncludes/XSVert.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: c7cd982b7344d2c42b273a1734f935e3
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins.meta
new file mode 100644
index 00000000..66b31554
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8624f7d3d918c134bb09ecbb9a677bd0
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin.meta
new file mode 100644
index 00000000..ad17328e
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cd886fcc7a158ed46b9f817fcf7552f1
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc.meta
new file mode 100644
index 00000000..07e64430
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4fee41c9956e7314ca1c268d3db37137
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/OrificeDefines.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/OrificeDefines.cginc
new file mode 100644
index 00000000..c46dbd14
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/OrificeDefines.cginc
@@ -0,0 +1,12 @@
+// Orifice Properties
+ half _OrificeChannel;
+ uniform sampler2D _OrificeData;
+ half _EntryOpenDuration;
+ half _Shape1Depth;
+ half _Shape1Duration;
+ half _Shape2Depth;
+ half _Shape2Duration;
+ half _Shape3Depth;
+ half _Shape3Duration;
+ half _BlendshapePower;
+ float _BlendshapeBadScaleFix;
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/OrificeDefines.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/OrificeDefines.cginc.meta
new file mode 100644
index 00000000..7cd24286
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/OrificeDefines.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 057f738dfbffe6342bf3e4dc93ea8a9a
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/PenetratorDefines.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/PenetratorDefines.cginc
new file mode 100644
index 00000000..e9224568
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/PenetratorDefines.cginc
@@ -0,0 +1,12 @@
+// Penetrator Properties
+half _Squeeze;
+half _SqueezeDist;
+half _BulgeOffset;
+half _BulgePower;
+half _Length;
+half _EntranceStiffness;
+half _Curvature;
+half _ReCurvature;
+half _WriggleSpeed;
+half _Wriggle;
+half _OrificeChannel; \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/PenetratorDefines.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/PenetratorDefines.cginc.meta
new file mode 100644
index 00000000..c73ad480
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/PenetratorDefines.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: bd16464122aff8341902ef7761cd9e9b
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSDefinesOrifice.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSDefinesOrifice.cginc
new file mode 100644
index 00000000..de88da5a
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSDefinesOrifice.cginc
@@ -0,0 +1,217 @@
+#include "UnityPBSLighting.cginc"
+#include "AutoLight.cginc"
+#include "UnityCG.cginc"
+
+struct VertexInput
+{
+ float4 vertex : POSITION;
+ float2 uv : TEXCOORD0;
+ float2 uv1 : TEXCOORD1;
+ float2 uv2 : TEXCOORD2;
+ float3 normal : NORMAL;
+ float4 tangent : TANGENT;
+ float4 color : COLOR;
+ uint vertexId : SV_VertexID;
+};
+
+struct VertexOutput
+{
+ #if defined(Geometry)
+ float4 pos : CLIP_POS;
+ float4 vertex : SV_POSITION; // We need both of these in order to shadow Outlines correctly
+ #else
+ float4 pos : SV_POSITION;
+ #endif
+
+ float2 uv : TEXCOORD0;
+ float2 uv1 : TEXCOORD1;
+ float3 ntb[3] : TEXCOORD2; //texcoord 3, 4 || Holds World Normal, Tangent, and Bitangent
+ float4 worldPos : TEXCOORD5;
+ float4 color : TEXCOORD6;
+ float3 normal : TEXCOORD8;
+ float4 screenPos : TEXCOORD9;
+ float3 objPos : TEXCOORD11;
+ float2 uv2 : TEXCOORD12;
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ SHADOW_COORDS(7)
+ UNITY_FOG_COORDS(10)
+ #endif
+};
+
+#if defined(Geometry)
+ struct v2g
+ {
+ float4 pos : CLIP_POS;
+ float4 vertex : SV_POSITION;
+ float2 uv : TEXCOORD0;
+ float2 uv1 : TEXCOORD1;
+ float3 ntb[3] : TEXCOORD2; //texcoord 3, 4 || Holds World Normal, Tangent, and Bitangent
+ float4 worldPos : TEXCOORD5;
+ float4 color : TEXCOORD6;
+ float3 normal : TEXCOORD8;
+ float4 screenPos : TEXCOORD9;
+ float3 objPos : TEXCOORD11;
+ float2 uv2 : TEXCOORD12;
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ SHADOW_COORDS(7)
+ UNITY_FOG_COORDS(10)
+ #endif
+ };
+
+ struct g2f
+ {
+ float4 pos : SV_POSITION;
+ float2 uv : TEXCOORD0;
+ float2 uv1 : TEXCOORD1;
+ float3 ntb[3] : TEXCOORD2; //texcoord 3, 4 || Holds World Normal, Tangent, and Bitangent
+ float4 worldPos : TEXCOORD5;
+ float4 color : TEXCOORD6;
+ float4 screenPos : TEXCOORD8;
+ float3 objPos : TEXCOORD10;
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ SHADOW_COORDS(7)
+ UNITY_FOG_COORDS(9)
+ #endif
+ };
+#endif
+
+struct XSLighting
+{
+ half4 albedo;
+ half4 normalMap;
+ half4 detailNormal;
+ half4 detailMask;
+ half4 metallicGlossMap;
+ half4 reflectivityMask;
+ half4 specularMap;
+ half4 thickness;
+ half4 occlusion;
+ half4 emissionMap;
+ half4 rampMask;
+ half4 hsvMask;
+ half4 clipMap;
+ half4 dissolveMask;
+ half3 diffuseColor;
+ half attenuation;
+ half3 normal;
+ half3 tangent;
+ half3 bitangent;
+ half4 worldPos;
+ half3 color;
+ half alpha;
+ float isOutline;
+ float4 screenPos;
+ float2 screenUV;
+ float3 objPos;
+};
+
+struct TextureUV
+{
+ half2 uv0;
+ half2 uv1;
+ half2 albedoUV;
+ half2 specularMapUV;
+ half2 metallicGlossMapUV;
+ half2 detailMaskUV;
+ half2 normalMapUV;
+ half2 detailNormalUV;
+ half2 thicknessMapUV;
+ half2 occlusionUV;
+ half2 reflectivityMaskUV;
+ half2 emissionMapUV;
+ half2 outlineMaskUV;
+ half2 clipMapUV;
+ half2 dissolveUV;
+};
+
+struct DotProducts
+{
+ half ndl;
+ half vdn;
+ half vdh;
+ half tdh;
+ half bdh;
+ half ndh;
+ half rdv;
+ half ldh;
+ half svdn;
+};
+
+struct VertexLightInformation {
+ float3 Direction[4];
+ float3 ColorFalloff[4];
+ float Attenuation[4];
+};
+
+UNITY_DECLARE_TEX2D(_MainTex); half4 _MainTex_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_ClipMap); half4 _ClipMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_DissolveTexture); half4 _DissolveTexture_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_BumpMap); half4 _BumpMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_DetailNormalMap); half4 _DetailNormalMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_DetailMask); half4 _DetailMask_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_SpecularMap); half4 _SpecularMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_MetallicGlossMap); half4 _MetallicGlossMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_ReflectivityMask); half4 _ReflectivityMask_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_ThicknessMap); half4 _ThicknessMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_EmissionMap); half4 _EmissionMap_ST;
+UNITY_DECLARE_TEX2D_NOSAMPLER(_RampSelectionMask);
+UNITY_DECLARE_TEX2D_NOSAMPLER(_HSVMask);
+sampler2D _OcclusionMap; half4 _OcclusionMap_ST;
+sampler2D _OutlineMask;
+sampler2D _Matcap;
+sampler2D _Ramp;
+samplerCUBE _BakedCubemap;
+sampler2D _GrabTexture;
+float4 _GrabTexture_TexelSize;
+
+#if defined(UNITY_PASS_SHADOWCASTER)
+ sampler3D _DitherMaskLOD;
+#endif
+
+half4 _Color;
+half4 _ClipAgainstVertexColorGreaterZeroFive, _ClipAgainstVertexColorLessZeroFive;
+half _Cutoff;
+half _DissolveProgress, _DissolveStrength;
+int _DissolveCoordinates;
+int _UseClipsForDissolve;
+
+half4 _ShadowRim,
+ _OutlineColor, _SSColor,
+ _EmissionColor, _MatcapTint,
+ _RimColor, _DissolveColor;
+
+half _MatcapTintToDiffuse;
+
+half _FadeDitherDistance;
+half _EmissionToDiffuse, _ScaleWithLightSensitivity;
+half _Hue, _Saturation, _Value;
+half _Metallic, _Glossiness, _OcclusionIntensity, _Reflectivity, _ClearcoatStrength, _ClearcoatSmoothness;
+half _BumpScale, _DetailNormalMapScale;
+half _SpecularIntensity, _SpecularSharpness, _SpecularArea, _AnisotropicSpecular, _AnisotropicReflection, _SpecularAlbedoTint;
+half _IOR;
+half _HalftoneDotSize, _HalftoneDotAmount, _HalftoneLineAmount, _HalftoneLineIntensity;
+half _RimRange, _RimThreshold, _RimIntensity, _RimSharpness, _RimAlbedoTint, _RimCubemapTint, _RimAttenEffect;
+half _ShadowRimRange, _ShadowRimThreshold, _ShadowRimSharpness, _ShadowSharpness, _ShadowRimAlbedoTint;
+half _SSDistortion, _SSPower, _SSScale;
+half _OutlineWidth;
+
+int _HalftoneType;
+int _FadeDither;
+int _BlendMode;
+int _OcclusionMode;
+int _UseRefraction;
+int _ReflectionMode, _ReflectionBlendMode, _ClearCoat;
+int _TilingMode, _VertexColorAlbedo, _ScaleWithLight;
+int _OutlineAlbedoTint, _OutlineLighting, _OutlineNormalMode;
+int _UVSetAlbedo, _UVSetNormal, _UVSetDetNormal,
+ _UVSetDetMask, _UVSetMetallic, _UVSetSpecular,
+ _UVSetThickness, _UVSetOcclusion, _UVSetReflectivity,
+ _UVSetEmission, _UVSetClipMap, _UVSetDissolve;
+int _NormalMapMode, _OutlineUVSelect;
+
+//Defines for helper functions
+#define grayscaleVec float3(0.2125, 0.7154, 0.0721)
+#define WorldNormalVector(normal0, normal) half3(dot(normal0,normal), dot(normal0, normal), dot(normal0,normal)) \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSDefinesOrifice.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSDefinesOrifice.cginc.meta
new file mode 100644
index 00000000..86dcb986
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSDefinesOrifice.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 760e4c2f910bbc9469a1faf16d677a08
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSFrag.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSFrag.cginc
new file mode 100644
index 00000000..e759d766
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSFrag.cginc
@@ -0,0 +1,90 @@
+float4 frag (
+ #if defined(Geometry)
+ g2f i
+ #else
+ VertexOutput i
+ #endif
+ , uint facing : SV_IsFrontFace
+ ) : SV_Target
+{
+ TextureUV t = (TextureUV)0; // Populate UVs
+ if(_TilingMode != 1) { InitializeTextureUVs(i, t); } else { InitializeTextureUVsMerged(i, t); };
+
+ #ifdef UNITY_PASS_SHADOWCASTER
+ XSLighting o = (XSLighting)0; //Populate Lighting Struct, but only with important shadowcaster stuff!
+ o.albedo = UNITY_SAMPLE_TEX2D(_MainTex, t.albedoUV) * _Color * lerp(1, float4(i.color.rgb, 1), _VertexColorAlbedo);
+ o.clipMap = UNITY_SAMPLE_TEX2D_SAMPLER(_ClipMap, _MainTex, t.clipMapUV);
+ o.dissolveMask = UNITY_SAMPLE_TEX2D_SAMPLER(_DissolveTexture, _MainTex, t.dissolveUV);
+
+ o.worldPos = i.worldPos;
+ o.screenUV = calcScreenUVs(i.screenPos);
+ o.screenPos = i.screenPos;
+ o.objPos = i.objPos;
+
+ float4 outCol = 0;
+ calcAlpha(o);
+ calcDissolve(o, outCol);
+ SHADOW_CASTER_FRAGMENT(i);
+ #else
+ /*
+ UNITY_LIGHT_ATTENUATION(attenuation, i, i.worldPos.xyz);
+
+ // fix for rare bug where light atten is 0 when there is no directional light in the scene
+ #ifdef UNITY_PASS_FORWARDBASE
+ if(all(_LightColor0.rgb == 0.0))
+ {
+ attenuation = 1.0;
+ }
+ #endif
+
+ #if defined(DIRECTIONAL)
+ half sharp = _ShadowSharpness * 0.5;
+ attenuation = smoothstep(sharp, 1-sharp, attenuation); //Converge at the center line
+ #endif
+ */
+
+ bool face = facing > 0; // True if on front face, False if on back face
+ if (!face) // Invert Normals based on face
+ {
+ if(i.color.a > 0.99) { discard; }//Discard outlines front face always. This way cull off and outlines can be enabled.
+
+ i.ntb[0] = -i.ntb[0];
+ i.ntb[1] = -i.ntb[1];
+ i.ntb[2] = -i.ntb[2];
+ }
+
+ XSLighting o = (XSLighting)0; //Populate Lighting Struct
+ o.albedo = UNITY_SAMPLE_TEX2D(_MainTex, t.albedoUV) * _Color * lerp(1, float4(i.color.rgb, 1), _VertexColorAlbedo);
+ o.specularMap = UNITY_SAMPLE_TEX2D_SAMPLER(_SpecularMap, _MainTex, t.specularMapUV);
+ o.metallicGlossMap = UNITY_SAMPLE_TEX2D_SAMPLER(_MetallicGlossMap, _MainTex, t.metallicGlossMapUV);
+ o.detailMask = UNITY_SAMPLE_TEX2D_SAMPLER(_DetailMask, _MainTex, t.detailMaskUV);
+ o.normalMap = UNITY_SAMPLE_TEX2D_SAMPLER(_BumpMap, _MainTex, t.normalMapUV);
+ o.detailNormal = UNITY_SAMPLE_TEX2D_SAMPLER(_DetailNormalMap, _MainTex, t.detailNormalUV);
+ o.thickness = UNITY_SAMPLE_TEX2D_SAMPLER(_ThicknessMap, _MainTex, t.thicknessMapUV);
+ o.occlusion = tex2D(_OcclusionMap, t.occlusionUV);
+ o.reflectivityMask = UNITY_SAMPLE_TEX2D_SAMPLER(_ReflectivityMask, _MainTex, t.reflectivityMaskUV) * _Reflectivity;
+ o.emissionMap = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap, _MainTex, t.emissionMapUV) * _EmissionColor;
+ o.rampMask = UNITY_SAMPLE_TEX2D_SAMPLER(_RampSelectionMask, _MainTex, i.uv); // This texture doesn't need to ever be on a second uv channel, and doesn't need tiling, convince me otherwise.
+ o.hsvMask = UNITY_SAMPLE_TEX2D_SAMPLER(_HSVMask, _MainTex, t.albedoUV);
+ o.clipMap = UNITY_SAMPLE_TEX2D_SAMPLER(_ClipMap, _MainTex, t.clipMapUV);
+ o.dissolveMask = UNITY_SAMPLE_TEX2D_SAMPLER(_DissolveTexture, _MainTex, t.dissolveUV);
+
+ o.diffuseColor = o.albedo.rgb; //Store this to separate the texture color and diffuse color for later.
+ o.attenuation = 1.0;
+ o.normal = i.ntb[0];
+ o.tangent = i.ntb[1];
+ o.bitangent = i.ntb[2];
+ o.worldPos = i.worldPos;
+ o.color = i.color.rgb;
+ o.isOutline = i.color.a;
+ o.screenUV = calcScreenUVs(i.screenPos);
+ o.screenPos = i.screenPos;
+ o.objPos = i.objPos;
+
+ float4 col = BRDF_XSLighting(o);
+ calcAlpha(o);
+ calcDissolve(o, col);
+ UNITY_APPLY_FOG(i.fogCoord, col);
+ return float4(col.rgb, o.alpha);
+ #endif
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSFrag.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSFrag.cginc.meta
new file mode 100644
index 00000000..6b19f27f
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSFrag.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: ced9d254377abc8499a65fdd16c7e636
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVert.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVert.cginc
new file mode 100644
index 00000000..61250dd6
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVert.cginc
@@ -0,0 +1,152 @@
+void GetBestLights( float Channel, inout int orificeType, inout float3 orificePositionTracker, inout float3 orificeNormalTracker, inout float3 penetratorPositionTracker, inout float penetratorLength ) {
+ float ID = step( 0.5 , Channel );
+ float baseID = ( ID * 0.02 );
+ float holeID = ( baseID + 0.01 );
+ float ringID = ( baseID + 0.02 );
+ float normalID = ( 0.05 + ( ID * 0.01 ) );
+ float penetratorID = ( 0.09 + ( ID * -0.01 ) );
+ float4 orificeWorld;
+ float4 orificeNormalWorld;
+ float4 penetratorWorld;
+ float penetratorDist=100;
+ for (int i=0;i<4;i++) {
+ float range = (0.005 * sqrt(1000000 - unity_4LightAtten0[i])) / sqrt(unity_4LightAtten0[i]);
+ if (length(unity_LightColor[i].rgb) < 0.01) {
+ if (abs(fmod(range,0.1)-holeID)<0.005) {
+ orificeType=0;
+ orificeWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ orificePositionTracker = mul( unity_WorldToObject, orificeWorld ).xyz;
+ }
+ if (abs(fmod(range,0.1)-ringID)<0.005) {
+ orificeType=1;
+ orificeWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ orificePositionTracker = mul( unity_WorldToObject, orificeWorld ).xyz;
+ }
+ if (abs(fmod(range,0.1)-normalID)<0.005) {
+ orificeNormalWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ orificeNormalTracker = mul( unity_WorldToObject, orificeNormalWorld ).xyz;
+ }
+ if (abs(fmod(range,0.1)-penetratorID)<0.005) {
+ float3 tempPenetratorPositionTracker = penetratorPositionTracker;
+ penetratorWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ penetratorPositionTracker = mul( unity_WorldToObject, penetratorWorld ).xyz;
+ if (length(penetratorPositionTracker)>length(tempPenetratorPositionTracker)) {
+ penetratorPositionTracker = tempPenetratorPositionTracker;
+ } else {
+ penetratorLength=unity_LightColor[i].a;
+ }
+ }
+ }
+ }
+}
+
+void PenetratorReshape(inout float4 vertex, inout float3 normal) {
+ float orificeChannel=0;
+ float orificeType = 0;
+ float3 orificePositionTracker = float3(0,0,100);
+ float3 orificeNormalTracker = float3(0,0,99);
+ float3 penetratorPositionTracker = float3(0,0,1);
+ float3 penetratorNormalTracker = float3(0,0,1);
+ float pl=0;
+ GetBestLights(orificeChannel, orificeType, orificePositionTracker, orificeNormalTracker, penetratorNormalTracker, pl);
+ float3 orificeNormal = normalize( lerp( ( orificePositionTracker - orificeNormalTracker ) , orificePositionTracker , max( _EntranceStiffness , 0.01 )) );
+ float behind = smoothstep(-_Length*0.5, _Length*0.2, orificePositionTracker.z);
+ //orificePositionTracker.xy = behind * orificePositionTracker.xy;
+ //orificeNormal.xy = behind * orificeNormal.xy;
+ orificePositionTracker.z=(abs(orificePositionTracker.z+(_Length*0.2))-(_Length*0.2))*(1+step(orificePositionTracker.z,0)*2);
+ orificePositionTracker.z=smoothstep(-_Length*0.2, _Length*0.2, orificePositionTracker.z) * orificePositionTracker.z;
+ float distanceToOrifice = length( orificePositionTracker );
+ float3 PhysicsNormal = normalize(penetratorNormalTracker.xyz);
+ float enterFactor = smoothstep( _Length , _Length+0.05 , distanceToOrifice);
+ float wriggleTimeY = _Time.y * _WriggleSpeed;
+ float curvatureMod = ( _Length * ( ( cos( wriggleTimeY ) * _Wriggle ) + _Curvature ) );
+ float wriggleTimeX = _Time.y * ( _WriggleSpeed * 0.79 );
+ float3 finalOrificeNormal = normalize( lerp( orificeNormal , ( PhysicsNormal + ( ( float3(0,1,0) * ( curvatureMod + ( _Length * ( _ReCurvature + ( ( sin( wriggleTimeY ) * 0.3 ) * _Wriggle ) ) * 2.0 ) ) ) + ( float3(0.5,0,0) * ( cos( wriggleTimeX ) * _Wriggle ) ) ) ) , enterFactor) );
+ float3 finalOrificePosition = lerp( orificePositionTracker , ( ( normalize(penetratorNormalTracker) * _Length ) + ( float3(0,0.2,0) * ( sin( ( wriggleTimeY + UNITY_PI ) ) * _Wriggle ) * _Length ) + ( float3(0.2,0,0) * _Length * ( sin( ( wriggleTimeX + UNITY_PI ) ) * _Wriggle ) ) ) , enterFactor);
+ float finalOrificeDistance = length( finalOrificePosition );
+ float3 bezierBasePosition = float3(0,0,0);
+ float bezierDistanceThird = ( finalOrificeDistance / 3.0 );
+ float3 curvatureOffset = lerp( float3( 0,0,0 ) , ( float3(0,1,0) * ( curvatureMod * -0.2 ) ) , saturate( ( distanceToOrifice / _Length ) ));
+ float3 bezierBaseNormal = ( ( bezierDistanceThird * float3(0,0,1) ) + curvatureOffset );
+ float3 bezierOrificeNormal = ( finalOrificePosition - ( bezierDistanceThird * finalOrificeNormal ) );
+ float3 bezierOrificePosition = finalOrificePosition;
+ float vertexBaseTipPosition = ( vertex.z / finalOrificeDistance );
+
+ float3 sphereifyDistance = ( vertex.xyz - float3(0,0, distanceToOrifice) );
+ float3 sphereifyNormal = normalize( sphereifyDistance );
+ float sphereifyFactor = smoothstep( 0.01 , -0.01 , distanceToOrifice - vertex.z);
+ sphereifyFactor *= 1-orificeType;
+ vertex.xyz = lerp( vertex.xyz , ( float3(0,0, distanceToOrifice) + ( min( length( sphereifyDistance ) , _Squeeze ) * sphereifyNormal ) ) , sphereifyFactor);
+
+ float squeezeFactor = smoothstep( 0.0 , _SqueezeDist , vertex.z - distanceToOrifice);
+ squeezeFactor = max( squeezeFactor , smoothstep( 0.0 , _SqueezeDist , distanceToOrifice - vertex.z));
+ squeezeFactor = 1- (1-squeezeFactor) * smoothstep(0,0.01,vertex.z) * behind * (1-enterFactor);
+ vertex.xy = lerp( ( normalize(vertex.xy) * min( length( vertex.xy ) , _Squeeze ) ) , vertex.xy , squeezeFactor);
+
+ float bulgeFactor = 1-smoothstep( 0.0 , _BulgeOffset , abs( ( finalOrificeDistance - vertex.z ) ));
+ float bulgeFactorBaseClip = smoothstep( 0.0 , 0.05 , vertex.z);
+ vertex.xy *= lerp( 1.0 , ( 1.0 + _BulgePower ) , ( bulgeFactor * bulgeFactorBaseClip * behind * (1-enterFactor)));
+
+ float t = saturate(vertexBaseTipPosition);
+ float oneMinusT = 1 - t;
+ float3 bezierPoint = oneMinusT * oneMinusT * oneMinusT * bezierBasePosition + 3 * oneMinusT * oneMinusT * t * bezierBaseNormal + 3 * oneMinusT * t * t * bezierOrificeNormal + t * t * t * bezierOrificePosition;
+ float3 straightLine = (float3(0.0 , 0.0 , vertex.z));
+ float baseFactor = smoothstep( 0.05 , -0.05 , vertex.z);
+ bezierPoint = lerp( bezierPoint , straightLine , baseFactor);
+ bezierPoint = lerp( ( ( finalOrificeNormal * ( vertex.z - finalOrificeDistance ) ) + finalOrificePosition ) , bezierPoint , step( vertexBaseTipPosition , 1.0 ));
+ float3 bezierDerivitive = 3 * oneMinusT * oneMinusT * (bezierBaseNormal - bezierBasePosition) + 6 * oneMinusT * t * (bezierOrificeNormal - bezierBaseNormal) + 3 * t * t * (bezierOrificePosition - bezierOrificeNormal);
+ bezierDerivitive = normalize( lerp( bezierDerivitive , float3(0,0,1) , baseFactor) );
+ float bezierUpness = dot( bezierDerivitive , float3( 0,1,0 ) );
+ float3 bezierUp = lerp( float3(0,1,0) , float3( 0,0,-1 ) , saturate( bezierUpness ));
+ float bezierDownness = dot( bezierDerivitive , float3( 0,-1,0 ) );
+ bezierUp = normalize( lerp( bezierUp , float3( 0,0,1 ) , saturate( bezierDownness )) );
+ float3 bezierSpaceX = normalize( cross( bezierDerivitive , bezierUp ) );
+ float3 bezierSpaceY = normalize( cross( bezierDerivitive , -bezierSpaceX ) );
+ float3 bezierSpaceVertexOffset = ( ( vertex.y * bezierSpaceY ) + ( vertex.x * -bezierSpaceX ) );
+ float3 bezierSpaceVertexOffsetNormal = normalize( bezierSpaceVertexOffset );
+ float distanceFromTip = ( finalOrificeDistance - vertex.z );
+
+ float3 bezierSpaceVertexOffsetFinal = lerp( bezierSpaceVertexOffset , bezierSpaceVertexOffset , enterFactor);
+ float3 bezierConstructedVertex = ( bezierPoint + bezierSpaceVertexOffsetFinal );
+
+ normal = normalize( ( ( -bezierSpaceX * normal.x ) + ( bezierSpaceY * normal.y ) + ( bezierDerivitive * normal.z ) ) );
+ vertex.xyz = bezierConstructedVertex;
+
+ vertex.w = 1;
+}
+
+VertexOutput vert (VertexInput v)
+{
+ PenetratorReshape(v.vertex, v.normal);
+ v.vertex.w = 1;
+
+ VertexOutput o = (VertexOutput)0;
+ float3 wnormal = UnityObjectToWorldNormal(v.normal);
+ float3 tangent = UnityObjectToWorldDir(v.tangent.xyz);
+ half tangentSign = v.tangent.w * unity_WorldTransformParams.w;
+ float3 bitangent = cross(wnormal, tangent) * tangentSign;
+
+ #if defined(Geometry)
+ o.vertex = v.vertex;
+ #endif
+
+ o.pos = UnityObjectToClipPos(v.vertex);
+ o.worldPos = mul(unity_ObjectToWorld, v.vertex);
+ o.ntb[0] = wnormal;
+ o.ntb[1] = tangent;
+ o.ntb[2] = bitangent;
+ o.uv = v.uv;
+ o.uv1 = v.uv1;
+ o.color = float4(v.color.rgb, 0); // store if outline in alpha channel of vertex colors | 0 = not an outline
+ o.normal = v.normal;
+ o.screenPos = ComputeScreenPos(o.pos);
+ o.objPos = normalize(v.vertex);
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ UNITY_TRANSFER_SHADOW(o, o.uv);
+ UNITY_TRANSFER_FOG(o, o.pos);
+ #else
+ TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos);
+ #endif
+ return o;
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVert.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVert.cginc.meta
new file mode 100644
index 00000000..33ba4aaa
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVert.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 3aee5b5b0a75a1b418750bcbb63d4e19
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVertOrifice.cginc b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVertOrifice.cginc
new file mode 100644
index 00000000..69217835
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVertOrifice.cginc
@@ -0,0 +1,118 @@
+void GetBestLights( float Channel, inout int orificeType, inout float3 orificePositionTracker, inout float3 orificeNormalTracker, inout float3 penetratorPositionTracker, inout float penetratorLength ) {
+ float ID = step( 0.5 , Channel );
+ float baseID = ( ID * 0.02 );
+ float holeID = ( baseID + 0.01 );
+ float ringID = ( baseID + 0.02 );
+ float normalID = ( 0.05 + ( ID * 0.01 ) );
+ float penetratorID = ( 0.09 + ( ID * -0.01 ) );
+ float4 orificeWorld;
+ float4 orificeNormalWorld;
+ float4 penetratorWorld;
+ float penetratorDist=100;
+ for (int i=0;i<4;i++) {
+ float range = (0.005 * sqrt(1000000 - unity_4LightAtten0[i])) / sqrt(unity_4LightAtten0[i]);
+ if (length(unity_LightColor[i].rgb) < 0.01) {
+ if (abs(fmod(range,0.1)-holeID)<0.005) {
+ orificeType=0;
+ orificeWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ orificePositionTracker = mul( unity_WorldToObject, orificeWorld ).xyz;
+ }
+ if (abs(fmod(range,0.1)-ringID)<0.005) {
+ orificeType=1;
+ orificeWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ orificePositionTracker = mul( unity_WorldToObject, orificeWorld ).xyz;
+ }
+ if (abs(fmod(range,0.1)-normalID)<0.005) {
+ orificeNormalWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ orificeNormalTracker = mul( unity_WorldToObject, orificeNormalWorld ).xyz;
+ }
+ if (abs(fmod(range,0.1)-penetratorID)<0.005) {
+ float3 tempPenetratorPositionTracker = penetratorPositionTracker;
+ penetratorWorld = float4(unity_4LightPosX0[i], unity_4LightPosY0[i], unity_4LightPosZ0[i], 1);
+ penetratorPositionTracker = mul( unity_WorldToObject, penetratorWorld ).xyz;
+ if (length(penetratorPositionTracker)>length(tempPenetratorPositionTracker)) {
+ penetratorPositionTracker = tempPenetratorPositionTracker;
+ } else {
+ penetratorLength=unity_LightColor[i].a;
+ }
+ }
+ }
+ }
+}
+
+float3 getBlendOffset(float blendSampleIndex, float activationDepth, float activationSmooth, int vertexID, float penetrationDepth, float3 normal, float3 tangent, float3 binormal) {
+ float blendTextureSize = 1024;
+ float2 blendSampleUV = (float2(( ( fmod( (float)vertexID , blendTextureSize ) + 0.5 ) / (blendTextureSize) ) , ( ( ( floor( ( vertexID / (blendTextureSize) ) ) + 0.5 ) / (blendTextureSize) ) + blendSampleIndex/8 )));
+ float3 sampledBlend = tex2Dlod( _OrificeData, float4( blendSampleUV, 0, 0.0) ).rgb;
+ float blendActivation = smoothstep( ( activationDepth ) , ( activationDepth + activationSmooth ) , penetrationDepth);
+ blendActivation = -cos(blendActivation*3.1416)*0.5+0.5;
+ float3 blendOffset = ( ( sampledBlend - float3(1,1,1)) * (blendActivation) * _BlendshapePower * _BlendshapeBadScaleFix );
+ return ( ( blendOffset.x * normal ) + ( blendOffset.y * tangent ) + ( blendOffset.z * binormal ) );
+}
+
+void OrificeReshape(inout float4 vertex, inout float3 normal, float3 tangent, int vertexId) {
+ float penetratorLength = 0.1;
+ float penetratorDistance;
+ float3 orificePositionTracker = float3(0,0,-100);
+ float3 orificeNormalTracker = float3(0,0,-99);
+ float3 penetratorPositionTracker = float3(0,0,100);
+ float3 penetratorNormalTracker = float3(0,0,100);
+ float orificeType=0;
+
+ GetBestLights(orificeType, orificePositionTracker, orificeNormalTracker, penetratorPositionTracker, penetratorNormalTracker, penetratorLength);
+ penetratorDistance = distance(orificePositionTracker, penetratorPositionTracker );
+ float penetrationDepth = max(0, penetratorLength - penetratorDistance);
+
+ float3 binormal = normalize(cross( normal , tangent ));
+
+ vertex.xyz += getBlendOffset(0, 0, _EntryOpenDuration, vertexId, penetrationDepth, normal, tangent, binormal);
+ vertex.xyz += getBlendOffset(2, _Shape1Depth, _Shape1Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ vertex.xyz += getBlendOffset(4, _Shape2Depth, _Shape2Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ vertex.xyz += getBlendOffset(6, _Shape3Depth, _Shape3Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ vertex.w = 1;
+
+ normal += getBlendOffset(1, 0, _EntryOpenDuration, vertexId, penetrationDepth, normal, tangent, binormal);
+ normal += getBlendOffset(3, _Shape1Depth, _Shape1Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ normal += getBlendOffset(5, _Shape2Depth, _Shape2Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ normal += getBlendOffset(7, _Shape3Depth, _Shape3Duration, vertexId, penetrationDepth, normal, tangent, binormal);
+ normal = normalize(normal);
+}
+
+VertexOutput vert (VertexInput v)
+{
+ float3 normal = normalize( v.normal );
+ float3 tangent = normalize( v.tangent.xyz );
+ float3 binormal = normalize(cross( normal , tangent ));
+
+ OrificeReshape(v.vertex, v.normal, v.tangent.xyz, v.vertexId);
+
+ VertexOutput o = (VertexOutput)0;
+ float3 wnormal = UnityObjectToWorldNormal(v.normal);
+ tangent = UnityObjectToWorldDir(v.tangent.xyz);
+ half tangentSign = v.tangent.w * unity_WorldTransformParams.w;
+ float3 bitangent = cross(wnormal, tangent) * tangentSign;
+
+ #if defined(Geometry)
+ o.vertex = v.vertex;
+ #endif
+
+ o.pos = UnityObjectToClipPos(v.vertex);
+ o.worldPos = mul(unity_ObjectToWorld, v.vertex);
+ o.ntb[0] = wnormal;
+ o.ntb[1] = tangent;
+ o.ntb[2] = bitangent;
+ o.uv = v.uv;
+ o.uv1 = v.uv1;
+ o.color = float4(v.color.rgb, 0); // store if outline in alpha channel of vertex colors | 0 = not an outline
+ o.normal = v.normal;
+ o.screenPos = ComputeScreenPos(o.pos);
+ o.objPos = normalize(v.vertex);
+
+ #if !defined(UNITY_PASS_SHADOWCASTER)
+ UNITY_TRANSFER_SHADOW(o, o.uv);
+ UNITY_TRANSFER_FOG(o, o.pos);
+ #else
+ TRANSFER_SHADOW_CASTER_NOPOS(o, o.pos);
+ #endif
+ return o;
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVertOrifice.cginc.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVertOrifice.cginc.meta
new file mode 100644
index 00000000..1128c47b
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/CGInc/XSVertOrifice.cginc.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 10605fcc6c3a2c44e8590ea5ab00c824
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures: []
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders.meta
new file mode 100644
index 00000000..a14da936
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 59e6c81fc5e33ca42849706dfa987886
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Orifice.shader b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Orifice.shader
new file mode 100644
index 00000000..a56569a0
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Orifice.shader
@@ -0,0 +1,202 @@
+Shader "Xiexe/Toon2.0/XSToon2.0_Orifice"
+{
+ Properties
+ {
+ [Enum(Off, 0, On, 1)] _VertexColorAlbedo ("Vertex Color Albedo", Int) = 0
+ [Enum(Separated, 0, Merged, 1)] _TilingMode ("Tiling Mode", Int) = 0
+ [Enum(Off,0,Front,1,Back,2)] _Culling ("Culling Mode", Int) = 2
+ [Enum(Opaque, 0, Cutout, 1, Dithered, 2, Alpha To Coverage, 3, Transparent, 4, Fade, 5, Additive, 6)]_BlendMode("Blend Mode", Int) = 0
+ [Enum(None, 0, Plane, 1, Sphere, 2)]_RefractionModel("Refraction Model", Int) = 0
+ [Toggle(_COLOROVERLAY_ON)]_UseRefraction("Refraction", Int) = 0
+
+ // Penetrator Properties
+ _OrificeData("OrificeData", 2D) = "white" {}
+ _OrificeChannel("OrificeChannel Please Use 0", Float) = 0
+ _EntryOpenDuration("EntryOpenDuration", Range( 0 , 1)) = 0.1
+ _Shape1Depth("Shape1Depth", Range( 0 , 5)) = 0.1
+ _Shape1Duration("Shape1Duration", Range( 0 , 1)) = 0.1
+ _Shape2Depth("Shape2Depth", Range( 0 , 5)) = 0.2
+ _Shape2Duration("Shape2Duration", Range( 0 , 1)) = 0.1
+ _Shape3Depth("Shape3Depth", Range( 0 , 5)) = 0.3
+ _Shape3Duration("Shape3Duration", Range( 0 , 1)) = 0.1
+ _BlendshapePower("Blend Shape Power", Range(0,5)) = 1
+ _BlendshapeBadScaleFix("Blend Shape Bad Scale Fix", Range(1,100)) = 1
+
+ _MainTex("Texture", 2D) = "white" {}
+ _HSVMask("HSV Mask", 2D) = "white" {}
+ _Hue("Hue", Range(0,1)) = 0
+ _Saturation("Main Texture Saturation", Range(0,3)) = 1
+ _Value("Value", Range(0,3)) = 1
+
+ _Color("Color Tint", Color) = (1,1,1,1)
+ _Cutoff("Cutoff", Float) = 0.5
+
+ [ToggleUI]_FadeDither("Dither Distance Fading", Float) = 0
+ _FadeDitherDistance("Fade Dither Distance", Float) = 0
+
+ _BumpMap("Normal Map", 2D) = "bump" {}
+ _BumpScale("Normal Scale", Range(-2,2)) = 1
+
+ [Enum(Texture,0,Vertex Colors,1)] _NormalMapMode ("Normal Map Mode", Int) = 0
+ _DetailNormalMap("Detail Normal Map", 2D) = "bump" {}
+ _DetailMask("Detail Mask", 2D) = "white" {}
+ _DetailNormalMapScale("Detail Normal Scale", Range(-2,2)) = 1.0
+
+ [Enum(PBR(Unity Metallic Standard),0,Baked Cubemap,1,Matcap,2,Off,3)] _ReflectionMode ("Reflection Mode", Int) = 3
+ [Enum(Disabled,0, Enabled, 1)]_ClearCoat("ClearCoat", Int) = 0
+ [Enum(Additive,0,Multiply,1,Subtract,2)] _ReflectionBlendMode("Reflection Blend Mode", Int) = 0
+ _MetallicGlossMap("Metallic", 2D) = "white" {} //Metallic, 0, 0, Smoothness
+ _BakedCubemap("Baked Cubemap", CUBE) = "black" {}
+ _Matcap("Matcap", 2D) = "black" {}
+ [HDR]_MatcapTint("Matcap Tint", Color) = (1,1,1,1)
+ _MatcapTintToDiffuse("Matcap Tint To Diffuse", Range(0,1)) = 0
+ _ReflectivityMask("Reflection Mask" , 2D) = "white" {}
+ _Metallic("Metallic", Range(0,1)) = 0
+ _Glossiness("Smoothness", Range(0,1)) = 0
+ _Reflectivity("Reflectivity", Range(0,1)) = 0.5
+ _IOR("Index of Refraction", Range(1, 4)) = 0
+ _ClearcoatStrength("Clearcoat Reflectivity", Range(0, 1)) = 1
+ _ClearcoatSmoothness("Clearcoat Smoothness", Range(0, 1)) = 0.8
+
+ [Enum(Yes,0, No,1)] _ScaleWithLight("Emission Scale w/ Light", Int) = 1
+ _EmissionMap("Emission Map", 2D) = "white" {}
+ [HDR]_EmissionColor("Emission Color", Color) = (0,0,0,0)
+ _EmissionToDiffuse("Emission Tint To Diffuse", Range(0,1)) = 0
+ _ScaleWithLightSensitivity("Scaling Sensitivity", Range(0,1)) = 1
+
+ _RimColor("Rimlight Tint", Color) = (1,1,1,1)
+ _RimAlbedoTint("Rim Albedo Tint", Range(0,1)) = 0
+ _RimCubemapTint("Rim Environment Tint", Range(0,1)) = 0
+ _RimAttenEffect("Rim Attenuation Effect", Range(0,1)) = 1
+ _RimIntensity("Rimlight Intensity", Float) = 0
+ _RimRange("Rim Range", Range(0,1)) = 0.7
+ _RimThreshold("Rim Threshold", Range(0, 1)) = 0.1
+ _RimSharpness("Rim Sharpness", Range(0,1)) = 0.1
+
+ _SpecularSharpness("Specular Sharpness", Range(0,1)) = 0
+ _SpecularMap("Specular Map", 2D) = "white" {}
+ _SpecularIntensity("Specular Intensity", Float) = 0
+ _SpecularArea("Specular Smoothness", Range(0,1)) = 0.5
+ _AnisotropicSpecular("Specular Anisotropic", Range(-1,1)) = 0
+ _AnisotropicReflection("Reflection Anisotropic", Range(-1,1)) = 0
+ _SpecularAlbedoTint("Specular Albedo Tint", Range(0,1)) = 1
+
+ _RampSelectionMask("Ramp Mask", 2D) = "black" {}
+ _Ramp("Shadow Ramp", 2D) = "white" {}
+ _ShadowSharpness("Received Shadow Sharpness", Range(0,1)) = 0.5
+ _ShadowRim("Shadow Rim Tint", Color) = (1,1,1,1)
+ _ShadowRimRange("Shadow Rim Range", Range(0,1)) = 0.7
+ _ShadowRimThreshold("Shadow Rim Threshold", Range(0, 1)) = 0.1
+ _ShadowRimSharpness("Shadow Rim Sharpness", Range(0,1)) = 0.3
+ _ShadowRimAlbedoTint("Shadow Rim Albedo Tint", Range(0, 1)) = 0
+
+ [Enum(Indirect, 0, Integrated, 1)]_OcclusionMode("Occlusion Mode", Int) = 0
+ _OcclusionMap("Occlusion", 2D) = "white" {}
+ _OcclusionIntensity("Occlusion Intensity", Range(0,1)) = 1
+
+ [Enum(Off, 0, On, 1)]_OutlineAlbedoTint("Outline Albedo Tint", Int) = 0
+ [Enum(Lit, 0, Emissive, 1)]_OutlineLighting("Outline Lighting", Int) = 0
+ [Enum(Mesh Normals, 0, Vertex Color Normals, 1, UVChannel, 2)]_OutlineNormalMode("Outline Normal Mode", Int) = 0
+ [Enum(UV2, 1, UV3, 2)]_OutlineUVSelect("Altered Normal UV Channel", Int) = 2
+ _OutlineMask("Outline Mask", 2D) = "white" {}
+ _OutlineWidth("Outline Width", Range(0, 5)) = 1
+ [HDR]_OutlineColor("Outline Color", Color) = (0,0,0,1)
+
+ _ThicknessMap("Thickness Map", 2D) = "white" {}
+ _SSColor ("Subsurface Color", Color) = (0,0,0,0)
+ _SSDistortion("Normal Distortion", Range(0,3)) = 1
+ _SSPower("Subsurface Power", Range(0,3)) = 1
+ _SSScale("Subsurface Scale", Range(0,3)) = 1
+
+ [Enum(Shadows, 0, Highlights, 1, Shadows And Highlights, 2, Off, 3)] _HalftoneType("Halftones Type", Int) = 3
+ _HalftoneDotSize("Halftone Dot Size", Float) = 0.5
+ _HalftoneDotAmount("Halftone Dot Amount", Float) = 5
+ _HalftoneLineAmount("Halftone Line Amount", Float) = 2000
+ _HalftoneLineIntensity("Halftone Line Intensity", Range(0,1)) = 1
+
+ [Enum(UV, 0, Root Distance (Spherical), 1, Height, 2)]_DissolveCoordinates("Dissolve Shape", Int) = 0
+ _DissolveTexture("Dissolve Texture", 2D) = "black" {}
+ _DissolveStrength("Dissolve Sharpness", Float) = 1
+ [HDR]_DissolveColor("Dissolve Color", Color) = (1,1,1,1)
+ _DissolveProgress("Dissolve Amount", Range(0,1)) = 0
+ [ToggleUI]_UseClipsForDissolve("Do Dissolve", Int) = 0
+
+ _ClipAgainstVertexColorGreaterZeroFive("Clip Vert Color > 0.5", Vector) = (1,1,1,1)
+ _ClipAgainstVertexColorLessZeroFive("Clip Vert Color < 0.5", Vector) = (1,1,1,1)
+
+ [Enum(UV1,0,UV2,1)] _UVSetAlbedo("Albedo UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetNormal("Normal Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetDetNormal("Detail Normal UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetDetMask("Detail Mask UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetMetallic("Metallic Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetSpecular("Specular Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetReflectivity("Reflection Mask UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetThickness("Thickness Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetOcclusion("Occlusion Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetEmission("Emission Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetClipMap("Clip Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetDissolve("Dissolve Map UVs", Int) = 0
+
+ _ClipMap("Clip Map", 2D) = "black" {}
+ [HideInInspector][Enum(Basic, 0, Advanced, 1)]_AdvMode("Shader Mode", Int) = 0
+ [IntRange] _Stencil ("Stencil ID [0;255]", Range(0,255)) = 0
+ [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Stencil Comparison", Int) = 0
+ [Enum(UnityEngine.Rendering.StencilOp)] _StencilOp ("Stencil Operation", Int) = 0
+
+ [HideInInspector] _SrcBlend ("__src", int) = 1
+ [HideInInspector] _DstBlend ("__dst", int) = 0
+ [HideInInspector] _ZWrite ("__zw", int) = 1
+ [HideInInspector] _AlphaToMask("__am", int) = 0
+ }
+
+ SubShader
+ {
+ Tags { "RenderType"="Opaque" "Queue"="Geometry" }
+ Cull [_Culling]
+ AlphaToMask [_AlphaToMask]
+ Stencil
+ {
+ Ref [_Stencil]
+ Comp [_StencilComp]
+ Pass [_StencilOp]
+ }
+ Grabpass // Gets disabled via the editor script when not in use through the Lightmode Tag.
+ {
+ Tags{"LightMode" = "Always"}
+ "_GrabTexture"
+ }
+ Pass
+ {
+ Name "FORWARD"
+ Tags { "LightMode" = "ForwardBase" }
+ Blend [_SrcBlend] [_DstBlend]
+ ZWrite [_ZWrite]
+ CGPROGRAM
+ #pragma target 3.0
+ #pragma vertex vert
+ #pragma fragment frag
+ #pragma shader_feature _ALPHABLEND_ON
+ #pragma shader_feature _ALPHATEST_ON
+ #pragma multi_compile _ VERTEXLIGHT_ON
+ #pragma shader_feature _COLOROVERLAY_ON
+ #pragma multi_compile_fog
+ #pragma multi_compile_fwdbase
+
+ #ifndef UNITY_PASS_FORWARDBASE
+ #define UNITY_PASS_FORWARDBASE
+ #endif
+
+ #include "../CGInc/XSDefinesOrifice.cginc"
+ #include "../CGInc/OrificeDefines.cginc"
+ #include "../../../CGIncludes/XSHelperFunctions.cginc"
+ #include "../../../CGIncludes/XSLightingFunctions.cginc"
+ #include "../../../CGIncludes/XSLighting.cginc"
+ #include "../CGInc/XSVertOrifice.cginc"
+ #include "../../../CGIncludes/XSGeom.cginc"
+ #include "../CGInc/XSFrag.cginc"
+ ENDCG
+ }
+ }
+
+ CustomEditor "XSToonDynamicPenetration.XSToonInspector"
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Orifice.shader.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Orifice.shader.meta
new file mode 100644
index 00000000..4709171a
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Orifice.shader.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 2271bf3c1ed3db248b45cd571f507a29
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures:
+ - _MainTex: {instanceID: 0}
+ - _BumpMap: {instanceID: 0}
+ - _DetailNormalMap: {instanceID: 0}
+ - _DetailMask: {instanceID: 0}
+ - _MetallicGlossMap: {instanceID: 0}
+ - _BakedCubemap: {instanceID: 0}
+ - _Matcap: {instanceID: 0}
+ - _ReflectivityMask: {instanceID: 0}
+ - _EmissionMap: {instanceID: 0}
+ - _SpecularMap: {instanceID: 0}
+ - _RampSelectionMask: {instanceID: 0}
+ - _Ramp: {fileID: 2800000, guid: 529b95e318b684643b47bd73e037118a, type: 3}
+ - _OcclusionMap: {instanceID: 0}
+ - _OutlineMask: {instanceID: 0}
+ - _ThicknessMap: {instanceID: 0}
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Penetrator.shader b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Penetrator.shader
new file mode 100644
index 00000000..4563e290
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Penetrator.shader
@@ -0,0 +1,202 @@
+Shader "Xiexe/Toon2.0/XSToon2.0_Penetrator"
+{
+ Properties
+ {
+ [Enum(Off, 0, On, 1)] _VertexColorAlbedo ("Vertex Color Albedo", Int) = 0
+ [Enum(Separated, 0, Merged, 1)] _TilingMode ("Tiling Mode", Int) = 0
+ [Enum(Off,0,Front,1,Back,2)] _Culling ("Culling Mode", Int) = 2
+ [Enum(Opaque, 0, Cutout, 1, Dithered, 2, Alpha To Coverage, 3, Transparent, 4, Fade, 5, Additive, 6)]_BlendMode("Blend Mode", Int) = 0
+ [Enum(None, 0, Plane, 1, Sphere, 2)]_RefractionModel("Refraction Model", Int) = 0
+ [Toggle(_COLOROVERLAY_ON)]_UseRefraction("Refraction", Int) = 0
+
+ // Penetrator Properties
+ _Squeeze("squeeze", Range( 0 , 0.2)) = 0.0266
+ _SqueezeDist("SqueezeDist", Range( 0 , 0.1)) = 0.0289
+ _BulgeOffset("BulgeOffset", Range( 0 , 0.3)) = 0.139
+ _BulgePower("BulgePower", Range( 0 , 1)) = 0.00272
+ _Length("Penetrator Length", Range( 0 , 3)) = 0.3541295
+ _EntranceStiffness("EntranceStiffness", Range( 0.01 , 1)) = 0.01
+ _Curvature("Curvature", Range( -1 , 1)) = 0
+ _ReCurvature("ReCurvature", Range( -1 , 1)) = 0
+ _WriggleSpeed("WriggleSpeed", Range( 0.1 , 30)) = 6.2
+ _Wriggle("Wriggle", Range( 0 , 1)) = 0
+ _OrificeChannel("OrificeChannel Please Use 0", Float) = 0
+
+ _MainTex("Texture", 2D) = "white" {}
+ _HSVMask("HSV Mask", 2D) = "white" {}
+ _Hue("Hue", Range(0,1)) = 0
+ _Saturation("Main Texture Saturation", Range(0,3)) = 1
+ _Value("Value", Range(0,3)) = 1
+
+ _Color("Color Tint", Color) = (1,1,1,1)
+ _Cutoff("Cutoff", Float) = 0.5
+
+ [ToggleUI]_FadeDither("Dither Distance Fading", Float) = 0
+ _FadeDitherDistance("Fade Dither Distance", Float) = 0
+
+ _BumpMap("Normal Map", 2D) = "bump" {}
+ _BumpScale("Normal Scale", Range(-2,2)) = 1
+
+ [Enum(Texture,0,Vertex Colors,1)] _NormalMapMode ("Normal Map Mode", Int) = 0
+ _DetailNormalMap("Detail Normal Map", 2D) = "bump" {}
+ _DetailMask("Detail Mask", 2D) = "white" {}
+ _DetailNormalMapScale("Detail Normal Scale", Range(-2,2)) = 1.0
+
+ [Enum(PBR(Unity Metallic Standard),0,Baked Cubemap,1,Matcap,2,Off,3)] _ReflectionMode ("Reflection Mode", Int) = 3
+ [Enum(Disabled,0, Enabled, 1)]_ClearCoat("ClearCoat", Int) = 0
+ [Enum(Additive,0,Multiply,1,Subtract,2)] _ReflectionBlendMode("Reflection Blend Mode", Int) = 0
+ _MetallicGlossMap("Metallic", 2D) = "white" {} //Metallic, 0, 0, Smoothness
+ _BakedCubemap("Baked Cubemap", CUBE) = "black" {}
+ _Matcap("Matcap", 2D) = "black" {}
+ [HDR]_MatcapTint("Matcap Tint", Color) = (1,1,1,1)
+ _MatcapTintToDiffuse("Matcap Tint To Diffuse", Range(0,1)) = 0
+ _ReflectivityMask("Reflection Mask" , 2D) = "white" {}
+ _Metallic("Metallic", Range(0,1)) = 0
+ _Glossiness("Smoothness", Range(0,1)) = 0
+ _Reflectivity("Reflectivity", Range(0,1)) = 0.5
+ _IOR("Index of Refraction", Range(1, 4)) = 0
+ _ClearcoatStrength("Clearcoat Reflectivity", Range(0, 1)) = 1
+ _ClearcoatSmoothness("Clearcoat Smoothness", Range(0, 1)) = 0.8
+
+ [Enum(Yes,0, No,1)] _ScaleWithLight("Emission Scale w/ Light", Int) = 1
+ _EmissionMap("Emission Map", 2D) = "white" {}
+ [HDR]_EmissionColor("Emission Color", Color) = (0,0,0,0)
+ _EmissionToDiffuse("Emission Tint To Diffuse", Range(0,1)) = 0
+ _ScaleWithLightSensitivity("Scaling Sensitivity", Range(0,1)) = 1
+
+ _RimColor("Rimlight Tint", Color) = (1,1,1,1)
+ _RimAlbedoTint("Rim Albedo Tint", Range(0,1)) = 0
+ _RimCubemapTint("Rim Environment Tint", Range(0,1)) = 0
+ _RimAttenEffect("Rim Attenuation Effect", Range(0,1)) = 1
+ _RimIntensity("Rimlight Intensity", Float) = 0
+ _RimRange("Rim Range", Range(0,1)) = 0.7
+ _RimThreshold("Rim Threshold", Range(0, 1)) = 0.1
+ _RimSharpness("Rim Sharpness", Range(0,1)) = 0.1
+
+ _SpecularSharpness("Specular Sharpness", Range(0,1)) = 0
+ _SpecularMap("Specular Map", 2D) = "white" {}
+ _SpecularIntensity("Specular Intensity", Float) = 0
+ _SpecularArea("Specular Smoothness", Range(0,1)) = 0.5
+ _AnisotropicSpecular("Specular Anisotropic", Range(-1,1)) = 0
+ _AnisotropicReflection("Reflection Anisotropic", Range(-1,1)) = 0
+ _SpecularAlbedoTint("Specular Albedo Tint", Range(0,1)) = 1
+
+ _RampSelectionMask("Ramp Mask", 2D) = "black" {}
+ _Ramp("Shadow Ramp", 2D) = "white" {}
+ _ShadowSharpness("Received Shadow Sharpness", Range(0,1)) = 0.5
+ _ShadowRim("Shadow Rim Tint", Color) = (1,1,1,1)
+ _ShadowRimRange("Shadow Rim Range", Range(0,1)) = 0.7
+ _ShadowRimThreshold("Shadow Rim Threshold", Range(0, 1)) = 0.1
+ _ShadowRimSharpness("Shadow Rim Sharpness", Range(0,1)) = 0.3
+ _ShadowRimAlbedoTint("Shadow Rim Albedo Tint", Range(0, 1)) = 0
+
+ [Enum(Indirect, 0, Integrated, 1)]_OcclusionMode("Occlusion Mode", Int) = 0
+ _OcclusionMap("Occlusion", 2D) = "white" {}
+ _OcclusionIntensity("Occlusion Intensity", Range(0,1)) = 1
+
+ [Enum(Off, 0, On, 1)]_OutlineAlbedoTint("Outline Albedo Tint", Int) = 0
+ [Enum(Lit, 0, Emissive, 1)]_OutlineLighting("Outline Lighting", Int) = 0
+ [Enum(Mesh Normals, 0, Vertex Color Normals, 1, UVChannel, 2)]_OutlineNormalMode("Outline Normal Mode", Int) = 0
+ [Enum(UV2, 1, UV3, 2)]_OutlineUVSelect("Altered Normal UV Channel", Int) = 2
+ _OutlineMask("Outline Mask", 2D) = "white" {}
+ _OutlineWidth("Outline Width", Range(0, 5)) = 1
+ [HDR]_OutlineColor("Outline Color", Color) = (0,0,0,1)
+
+ _ThicknessMap("Thickness Map", 2D) = "white" {}
+ _SSColor ("Subsurface Color", Color) = (0,0,0,0)
+ _SSDistortion("Normal Distortion", Range(0,3)) = 1
+ _SSPower("Subsurface Power", Range(0,3)) = 1
+ _SSScale("Subsurface Scale", Range(0,3)) = 1
+
+ [Enum(Shadows, 0, Highlights, 1, Shadows And Highlights, 2, Off, 3)] _HalftoneType("Halftones Type", Int) = 3
+ _HalftoneDotSize("Halftone Dot Size", Float) = 0.5
+ _HalftoneDotAmount("Halftone Dot Amount", Float) = 5
+ _HalftoneLineAmount("Halftone Line Amount", Float) = 2000
+ _HalftoneLineIntensity("Halftone Line Intensity", Range(0,1)) = 1
+
+ [Enum(UV, 0, Root Distance (Spherical), 1, Height, 2)]_DissolveCoordinates("Dissolve Shape", Int) = 0
+ _DissolveTexture("Dissolve Texture", 2D) = "black" {}
+ _DissolveStrength("Dissolve Sharpness", Float) = 1
+ [HDR]_DissolveColor("Dissolve Color", Color) = (1,1,1,1)
+ _DissolveProgress("Dissolve Amount", Range(0,1)) = 0
+ [ToggleUI]_UseClipsForDissolve("Do Dissolve", Int) = 0
+
+ _ClipAgainstVertexColorGreaterZeroFive("Clip Vert Color > 0.5", Vector) = (1,1,1,1)
+ _ClipAgainstVertexColorLessZeroFive("Clip Vert Color < 0.5", Vector) = (1,1,1,1)
+
+ [Enum(UV1,0,UV2,1)] _UVSetAlbedo("Albedo UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetNormal("Normal Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetDetNormal("Detail Normal UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetDetMask("Detail Mask UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetMetallic("Metallic Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetSpecular("Specular Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetReflectivity("Reflection Mask UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetThickness("Thickness Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetOcclusion("Occlusion Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetEmission("Emission Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetClipMap("Clip Map UVs", Int) = 0
+ [Enum(UV1,0,UV2,1)] _UVSetDissolve("Dissolve Map UVs", Int) = 0
+
+ _ClipMap("Clip Map", 2D) = "black" {}
+ [HideInInspector][Enum(Basic, 0, Advanced, 1)]_AdvMode("Shader Mode", Int) = 0
+ [IntRange] _Stencil ("Stencil ID [0;255]", Range(0,255)) = 0
+ [Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp ("Stencil Comparison", Int) = 0
+ [Enum(UnityEngine.Rendering.StencilOp)] _StencilOp ("Stencil Operation", Int) = 0
+
+ [HideInInspector] _SrcBlend ("__src", int) = 1
+ [HideInInspector] _DstBlend ("__dst", int) = 0
+ [HideInInspector] _ZWrite ("__zw", int) = 1
+ [HideInInspector] _AlphaToMask("__am", int) = 0
+ }
+
+ SubShader
+ {
+ Tags { "RenderType"="Opaque" "Queue"="Geometry" }
+ Cull [_Culling]
+ AlphaToMask [_AlphaToMask]
+ Stencil
+ {
+ Ref [_Stencil]
+ Comp [_StencilComp]
+ Pass [_StencilOp]
+ }
+ Grabpass // Gets disabled via the editor script when not in use through the Lightmode Tag.
+ {
+ Tags{"LightMode" = "Always"}
+ "_GrabTexture"
+ }
+ Pass
+ {
+ Name "FORWARD"
+ Tags { "LightMode" = "ForwardBase" }
+ Blend [_SrcBlend] [_DstBlend]
+ ZWrite [_ZWrite]
+ CGPROGRAM
+ #pragma target 3.0
+ #pragma vertex vert
+ #pragma fragment frag
+ #pragma shader_feature _ALPHABLEND_ON
+ #pragma shader_feature _ALPHATEST_ON
+ #pragma multi_compile _ VERTEXLIGHT_ON
+ #pragma shader_feature _COLOROVERLAY_ON
+ #pragma multi_compile_fog
+ #pragma multi_compile_fwdbase
+
+ #ifndef UNITY_PASS_FORWARDBASE
+ #define UNITY_PASS_FORWARDBASE
+ #endif
+
+ #include "../../../CGIncludes/XSDefines.cginc"
+ #include "../CGInc/PenetratorDefines.cginc"
+ #include "../../../CGIncludes/XSHelperFunctions.cginc"
+ #include "../../../CGIncludes/XSLightingFunctions.cginc"
+ #include "../../../CGIncludes/XSLighting.cginc"
+ #include "../CGInc/XSVert.cginc"
+ #include "../../../CGIncludes/XSGeom.cginc"
+ #include "../CGInc/XSFrag.cginc"
+ ENDCG
+ }
+ }
+
+ CustomEditor "XSToonDynamicPenetration.XSToonInspector"
+} \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Penetrator.shader.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Penetrator.shader.meta
new file mode 100644
index 00000000..b1362c62
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Plugins/DynamicPenetrationSystem XS Plugin/Shaders/XSToon2.0 Penetrator.shader.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 662671fda57976d4dbecf70a929ad463
+ShaderImporter:
+ externalObjects: {}
+ defaultTextures:
+ - _MainTex: {instanceID: 0}
+ - _BumpMap: {instanceID: 0}
+ - _DetailNormalMap: {instanceID: 0}
+ - _DetailMask: {instanceID: 0}
+ - _MetallicGlossMap: {instanceID: 0}
+ - _BakedCubemap: {instanceID: 0}
+ - _Matcap: {instanceID: 0}
+ - _ReflectivityMask: {instanceID: 0}
+ - _EmissionMap: {instanceID: 0}
+ - _SpecularMap: {instanceID: 0}
+ - _RampSelectionMask: {instanceID: 0}
+ - _Ramp: {fileID: 2800000, guid: 529b95e318b684643b47bd73e037118a, type: 3}
+ - _OcclusionMap: {instanceID: 0}
+ - _OutlineMask: {instanceID: 0}
+ - _ThicknessMap: {instanceID: 0}
+ nonModifiableTextures: []
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders.meta
new file mode 100644
index 00000000..4bb86e76
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b0550db3d6e73834a854cb7a4117d4ee
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders/Nothing Here.txt b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders/Nothing Here.txt
new file mode 100644
index 00000000..9be9bcf8
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders/Nothing Here.txt
@@ -0,0 +1 @@
+Nothing \ No newline at end of file
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders/Nothing Here.txt.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders/Nothing Here.txt.meta
new file mode 100644
index 00000000..2a839ec4
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Main/Shaders/Nothing Here.txt.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 5faf1b199cd442c4ca4c70e5d4cd7dd7
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/README.md b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/README.md
new file mode 100644
index 00000000..8750dc19
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/README.md
@@ -0,0 +1 @@
+# Xiexes Unity Shaders Rewritten
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/README.md.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/README.md.meta
new file mode 100644
index 00000000..5145fb9c
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/README.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 27e519518a0077b49b94d2123252f17e
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures.meta
new file mode 100644
index 00000000..3d67dc18
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ff4bb24a3e5fdb34da4fdf7dcb167447
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps.meta
new file mode 100644
index 00000000..d2e33663
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e2cd09f3eb82f144ba619ecf9aae9341
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_3Light.exr b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_3Light.exr
new file mode 100644
index 00000000..f8ca0851
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_3Light.exr
Binary files differ
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_3Light.exr.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_3Light.exr.meta
new file mode 100644
index 00000000..4da8264d
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_3Light.exr.meta
@@ -0,0 +1,100 @@
+fileFormatVersion: 2
+guid: a954f8638607d434da3ed081c8871e70
+TextureImporter:
+ fileIDToRecycleName:
+ 8900000: generatedCubemap
+ externalObjects: {}
+ serializedVersion: 9
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 1
+ streamingMipmapsPriority: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 1
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 2
+ aniso: -1
+ mipBias: -100
+ wrapU: -1
+ wrapV: -1
+ wrapW: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 2
+ singleChannelComponent: 0
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - serializedVersion: 2
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 512
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ - serializedVersion: 2
+ buildTarget: Standalone
+ maxTextureSize: 512
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID:
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_SoftUnder_3Mid.exr b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_SoftUnder_3Mid.exr
new file mode 100644
index 00000000..728fed52
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_SoftUnder_3Mid.exr
Binary files differ
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_SoftUnder_3Mid.exr.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_SoftUnder_3Mid.exr.meta
new file mode 100644
index 00000000..d5675285
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/CubeMaps/XSStudio_SoftUnder_3Mid.exr.meta
@@ -0,0 +1,100 @@
+fileFormatVersion: 2
+guid: 2f2de34b7954ecd4686bd45ffc93ae46
+TextureImporter:
+ fileIDToRecycleName:
+ 8900000: generatedCubemap
+ externalObjects: {}
+ serializedVersion: 9
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 1
+ streamingMipmapsPriority: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 1
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 2
+ aniso: -1
+ mipBias: -100
+ wrapU: -1
+ wrapV: -1
+ wrapW: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 2
+ singleChannelComponent: 0
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - serializedVersion: 2
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 512
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ - serializedVersion: 2
+ buildTarget: Standalone
+ maxTextureSize: 512
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID:
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps.meta
new file mode 100644
index 00000000..754eb1a9
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f50f02e86841ff84c94c516926d6335c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated.meta
new file mode 100644
index 00000000..7c55d0fc
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5ca989996d4a0d848bec01a72692b1a3
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/gray to white.png b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/gray to white.png
new file mode 100644
index 00000000..4000fe3e
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/gray to white.png
Binary files differ
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/gray to white.png.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/gray to white.png.meta
new file mode 100644
index 00000000..1167cc90
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/gray to white.png.meta
@@ -0,0 +1,88 @@
+fileFormatVersion: 2
+guid: 4122f021ef68dbd4db09043994cb84f5
+TextureImporter:
+ fileIDToRecycleName: {}
+ externalObjects: {}
+ serializedVersion: 9
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: -1
+ aniso: -1
+ mipBias: -100
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ singleChannelComponent: 0
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - serializedVersion: 2
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 512
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 0
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID:
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/redgradient.png b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/redgradient.png
new file mode 100644
index 00000000..cbfc8eb8
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/redgradient.png
Binary files differ
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/redgradient.png.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/redgradient.png.meta
new file mode 100644
index 00000000..110e4c1a
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/redgradient.png.meta
@@ -0,0 +1,88 @@
+fileFormatVersion: 2
+guid: 233b910dec697a149a280bb86ebd7c31
+TextureImporter:
+ fileIDToRecycleName: {}
+ externalObjects: {}
+ serializedVersion: 9
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: -1
+ aniso: -1
+ mipBias: -100
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ singleChannelComponent: 0
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - serializedVersion: 2
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 512
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 0
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID:
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient.png b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient.png
new file mode 100644
index 00000000..cd3204cc
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient.png
Binary files differ
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient.png.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient.png.meta
new file mode 100644
index 00000000..47935f79
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient.png.meta
@@ -0,0 +1,99 @@
+fileFormatVersion: 2
+guid: 8d8e94ba38eb79f4dba95d689287f2b0
+TextureImporter:
+ fileIDToRecycleName: {}
+ externalObjects: {}
+ serializedVersion: 9
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 16
+ mipBias: -100
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ singleChannelComponent: 0
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - serializedVersion: 2
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 512
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 0
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ - serializedVersion: 2
+ buildTarget: Standalone
+ maxTextureSize: 512
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 0
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID:
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient2.png b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient2.png
new file mode 100644
index 00000000..dadec28d
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient2.png
Binary files differ
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient2.png.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient2.png.meta
new file mode 100644
index 00000000..ab36fb26
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/skingradient2.png.meta
@@ -0,0 +1,88 @@
+fileFormatVersion: 2
+guid: 1f12d1e2327b1454998269d7fe4cc200
+TextureImporter:
+ fileIDToRecycleName: {}
+ externalObjects: {}
+ serializedVersion: 9
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: -1
+ aniso: -1
+ mipBias: -100
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ singleChannelComponent: 0
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - serializedVersion: 2
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 512
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 0
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID:
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/smoothcutoff black to white.png b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/smoothcutoff black to white.png
new file mode 100644
index 00000000..cd43e3d0
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/smoothcutoff black to white.png
Binary files differ
diff --git a/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/smoothcutoff black to white.png.meta b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/smoothcutoff black to white.png.meta
new file mode 100644
index 00000000..3d72ad5e
--- /dev/null
+++ b/VRCSDK3AvatarsQuestLegacy/Assets/Resources/RalivDynamicPenetrationSystem/Plugins/Xiexes-Unity-Shaders-development/Textures/Shadow Ramps/Generated/smoothcutoff black to white.png.meta
@@ -0,0 +1,99 @@
+fileFormatVersion: 2
+guid: baa5bf6c21f06af4a9a3bca75b8321ba
+TextureImporter:
+ fileIDToRecycleName: {}
+ externalObjects: {}
+ serializedVersion: 9
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: -1
+ aniso: -1
+ mipBias: -100
+ wrapU: 1
+ wrapV: 1
+ wrapW: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ singleChannelComponent: 0
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ platformSettings:
+ - serializedVersion: 2
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ - serializedVersion: 2
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ androidETC2FallbackOverride: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID:
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ spritePackingTag:
+ pSDRemoveMatte: 0
+ pSDShowRemoveMatteOption: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant: