diff options
Diffstat (limited to 'VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2')
124 files changed, 16301 insertions, 0 deletions
diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes.meta new file mode 100644 index 00000000..2b97ea1e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8627c963133eb7a44944ff911d576115 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_FunctionsArtistic.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_FunctionsArtistic.cginc new file mode 100644 index 00000000..7d5e17c1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_FunctionsArtistic.cginc @@ -0,0 +1,369 @@ +#ifndef POI_FUNCTIONS_ARTISTIC + #define POI_FUNCTIONS_ARTISTIC + + // Based on unity shader graph code + + // * Adjustments * // + + /* + * Channel Mixer + * + * Controls the amount each of the channels of input In contribute to each of the channels of output Out. The slider + * parameters on the node control the contribution of each of the input channels. The toggle button parameters control + * which of the output channels is currently being edited. Slider controls for editing the contribution of each input + * channnel range between -2 and 2. + */ + void poiChannelMixer(float3 In, float3 _ChannelMixer_Red, float3 _ChannelMixer_Green, float3 _ChannelMixer_Blue, out float3 Out) + { + Out = float3(dot(In, _ChannelMixer_Red), dot(In, _ChannelMixer_Green), dot(In, _ChannelMixer_Blue)); + } + + /* + * Contrast + * + * Adjusts the contrast of input In by the amount of input Contrast. A Contrast value of 1 will return the input + * unaltered. A Contrast value of 0 will return the midpoint of the input + */ + void poiContrast(float3 In, float Contrast, out float3 Out) + { + float midpoint = pow(0.5, 2.2); + Out = (In - midpoint) * Contrast + midpoint; + } + + + /* + * Invert Colors + * + * Inverts the colors of input In on a per channel basis. This Node assumes all input values are in the range 0 - 1. + */ + void poiInvertColors(float4 In, float4 InvertColors, out float4 Out) + { + Out = abs(InvertColors - In); + } + + /* + * Replace Color + * + * Replaces values in input In equal to input From to the value of input To. Input Range can be used to define a + * wider range of values around input From to replace. Input Fuzziness can be used to soften the edges around the + * selection similar to anti-aliasing. + */ + void poiReplaceColor(float3 In, float3 From, float3 To, float Range, float Fuzziness, out float3 Out) + { + float Distance = distance(From, In); + Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 0.00001))); + } + + /* + * Saturation + * + * Adjusts the saturation of input In by the amount of input Saturation. A Saturation value of 1 will return the input + * unaltered. A Saturation value of 0 will return the input completely desaturated. + */ + void poiSaturation(float3 In, float Saturation, out float3 Out) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + Out = luma.xxx + Saturation.xxx * (In - luma.xxx); + } + + /* + * Dither Node + * + * Dither is an intentional form of noise used to randomize quantization error. It is used to prevent large-scale + * patterns such as color banding in images. The Dither node applies dithering in screen-space to ensure a uniform + * distribution of the pattern. This can be adjusted by connecting another node to input Screen Position. + * + * This Node is commonly used as an input to Alpha Clip Threshold on a Master Node to give the appearance of + * transparency to an opaque object. This is useful for creating objects that appear to be transparent but have + * the advantages of rendering as opaque, such as writing depth and/or being rendered in deferred. + */ + void poiDither(float4 In, float4 ScreenPosition, out float4 Out) + { + float2 uv = ScreenPosition.xy * _ScreenParams.xy; + float DITHER_THRESHOLDS[16] = { + 1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0, + 13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0, + 4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0, + 16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0 + }; + uint index = (uint(uv.x) % 4) * 4 + uint(uv.y) % 4; + Out = In - DITHER_THRESHOLDS[index]; + } + + /* + * Color Mask + * + * Creates a mask from values in input In equal to input Mask Color. Input Range can be used to define a wider + * range of values around input Mask Color to create the mask. Colors within this range will return 1, + * otherwise the node will return 0. Input Fuzziness can be used to soften the edges around the selection + * similar to anti-aliasing. + */ + void poiColorMask(float3 In, float3 MaskColor, float Range, float Fuzziness, out float4 Out) + { + float Distance = distance(MaskColor, In); + Out = saturate(1 - (Distance - Range) / max(Fuzziness, 0.00001)); + } + + float3 hueShift(float3 color, float Offset) + { + float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + float4 P = lerp(float4(color.bg, K.wz), float4(color.gb, K.xy), step(color.b, color.g)); + float4 Q = lerp(float4(P.xyw, color.r), float4(color.r, P.yzx), step(P.x, color.r)); + float D = Q.x - min(Q.w, Q.y); + float E = 0.0000000001; + float3 hsv = float3(abs(Q.z + (Q.w - Q.y) / (6.0 * D + E)), D / (Q.x + E), Q.x); + + float hue = hsv.x + Offset; + hsv.x = frac(hue); + + float4 K2 = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + float3 P2 = abs(frac(hsv.xxx + K2.xyz) * 6.0 - K2.www); + return hsv.z * lerp(K2.xxx, saturate(P2 - K2.xxx), hsv.y); + } + + static const float Epsilon = 1e-10; + // The weights of RGB contributions to luminance. + // Should sum to unity. + static const float3 HCYwts = float3(0.299, 0.587, 0.114); + static const float HCLgamma = 3; + static const float HCLy0 = 100; + static const float HCLmaxL = 0.530454533953517; // == exp(HCLgamma / HCLy0) - 0.5 + static const float3 wref = float3(1.0, 1.0, 1.0); + #define TAU 6.28318531 + + float3 HUEtoRGB(in float H) + { + float R = abs(H * 6 - 3) - 1; + float G = 2 - abs(H * 6 - 2); + float B = 2 - abs(H * 6 - 4); + return saturate(float3(R, G, B)); + } + + float3 RGBtoHCV(in float3 RGB) + { + // Based on work by Sam Hocevar and Emil Persson + float4 P = (RGB.g < RGB.b) ? float4(RGB.bg, -1.0, 2.0 / 3.0): float4(RGB.gb, 0.0, -1.0 / 3.0); + float4 Q = (RGB.r < P.x) ? float4(P.xyw, RGB.r): float4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6 * C + Epsilon) + Q.z); + return float3(H, C, Q.x); + } + + float3 HSVtoRGB(in float3 HSV) + { + float3 RGB = HUEtoRGB(HSV.x); + return((RGB - 1) * HSV.y + 1) * HSV.z; + } + + float3 RGBtoHSV(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float S = HCV.y / (HCV.z + Epsilon); + return float3(HCV.x, S, HCV.z); + } + + float3 HSLtoRGB(in float3 HSL) + { + float3 RGB = HUEtoRGB(HSL.x); + float C = (1 - abs(2 * HSL.z - 1)) * HSL.y; + return(RGB - 0.5) * C + HSL.z; + } + + float3 RGBtoHSL(in float3 RGB) + { + float3 HCV = RGBtoHCV(RGB); + float L = HCV.z - HCV.y * 0.5; + float S = HCV.y / (1 - abs(L * 2 - 1) + Epsilon); + return float3(HCV.x, S, L); + } + + float3 HCYtoRGB(in float3 HCY) + { + + + float3 RGB = HUEtoRGB(HCY.x); + float Z = dot(RGB, HCYwts); + if (HCY.z < Z) + { + HCY.y *= HCY.z / Z; + } + else if(Z < 1) + { + HCY.y *= (1 - HCY.z) / (1 - Z); + } + return(RGB - Z) * HCY.y + HCY.z; + } + + float3 RGBtoHCY(in float3 RGB) + { + // Corrected by David Schaeffer + float3 HCV = RGBtoHCV(RGB); + float Y = dot(RGB, HCYwts); + float Z = dot(HUEtoRGB(HCV.x), HCYwts); + if (Y < Z) + { + HCV.y *= Z / (Epsilon + Y); + } + else + { + HCV.y *= (1 - Z) / (Epsilon + 1 - Y); + } + return float3(HCV.x, HCV.y, Y); + } + + float3 HCLtoRGB(in float3 HCL) + { + float3 RGB = 0; + if(HCL.z != 0) + { + float H = HCL.x; + float C = HCL.y; + float L = HCL.z * HCLmaxL; + float Q = exp((1 - C / (2 * L)) * (HCLgamma / HCLy0)); + float U = (2 * L - C) / (2 * Q - 1); + float V = C / Q; + float A = (H + min(frac(2 * H) / 4, frac(-2 * H) / 8)) * pi * 2; + float T; + H *= 6; + if(H <= 0.999) + { + T = tan(A); + RGB.r = 1; + RGB.g = T / (1 + T); + } + else if(H <= 1.001) + { + RGB.r = 1; + RGB.g = 1; + } + else if(H <= 2) + { + T = tan(A); + RGB.r = (1 + T) / T; + RGB.g = 1; + } + else if(H <= 3) + { + T = tan(A); + RGB.g = 1; + RGB.b = 1 + T; + } + else if(H <= 3.999) + { + T = tan(A); + RGB.g = 1 / (1 + T); + RGB.b = 1; + } + else if(H <= 4.001) + { + RGB.g = 0; + RGB.b = 1; + } + else if(H <= 5) + { + T = tan(A); + RGB.r = -1 / T; + RGB.b = 1; + } + else + { + T = tan(A); + RGB.r = 1; + RGB.b = -T; + } + RGB = RGB * V + U; + } + return RGB; + } + + float3 RGBtoHCL(in float3 RGB) + { + float3 HCL; + float H = 0; + float U = min(RGB.r, min(RGB.g, RGB.b)); + float V = max(RGB.r, max(RGB.g, RGB.b)); + float Q = HCLgamma / HCLy0; + HCL.y = V - U; + if(HCL.y != 0) + { + H = atan2(RGB.g - RGB.b, RGB.r - RGB.g) / pi; + Q *= U / V; + } + Q = exp(Q); + HCL.x = frac(H / 2 - min(frac(H), frac(-H)) / 6); + HCL.y *= Q; + HCL.z = lerp(-U, V, Q) / (HCLmaxL * 2); + return HCL; + } + + //HSL MODIFT + float3 ModifyViaHSL(float3 color, float3 HSLMod) + { + float3 colorHSL = RGBtoHSL(color); + colorHSL.r = frac(colorHSL.r + HSLMod.r); + colorHSL.g = saturate(colorHSL.g + HSLMod.g); + colorHSL.b = saturate(colorHSL.b + HSLMod.b); + return HSLtoRGB(colorHSL); + } + + float3 poiSaturation(float3 In, float Saturation) + { + float luma = dot(In, float3(0.2126729, 0.7151522, 0.0721750)); + return luma.xxx + Saturation.xxx * (In - luma.xxx); + } + // LCH + float xyzF(float t) + { + return lerp(pow(t, 1. / 3.), 7.787037 * t + 0.139731, step(t, 0.00885645)); + } + float xyzR(float t) + { + return lerp(t * t * t, 0.1284185 * (t - 0.139731), step(t, 0.20689655)); + } + float3 rgb2lch(in float3 c) + { + c = mul(float3x3(0.4124, 0.3576, 0.1805, + 0.2126, 0.7152, 0.0722, + 0.0193, 0.1192, 0.9505), c); + c.x = xyzF(c.x / wref.x); + c.y = xyzF(c.y / wref.y); + c.z = xyzF(c.z / wref.z); + float3 lab = float3(max(0., 116.0 * c.y - 16.0), 500.0 * (c.x - c.y), 200.0 * (c.y - c.z)); + return float3(lab.x, length(float2(lab.y, lab.z)), atan2(lab.z, lab.y)); + } + + float3 lch2rgb(in float3 c) + { + c = float3(c.x, cos(c.z) * c.y, sin(c.z) * c.y); + + float lg = 1. / 116. * (c.x + 16.); + float3 xyz = float3(wref.x * xyzR(lg + 0.002 * c.y), + wref.y * xyzR(lg), + wref.z * xyzR(lg - 0.005 * c.z)); + + float3 rgb = mul(float3x3(3.2406, -1.5372, -0.4986, + - 0.9689, 1.8758, 0.0415, + 0.0557, -0.2040, 1.0570), xyz); + + return rgb; + } + + //cheaply lerp around a circle + float lerpAng(in float a, in float b, in float x) + { + float ang = fmod(fmod((a - b), TAU) + pi * 3., TAU) - pi; + return ang * x + b; + } + + //Linear interpolation between two colors in Lch space + float3 lerpLch(in float3 a, in float3 b, in float x) + { + float hue = lerpAng(a.z, b.z, x); + return float3(lerp(b.xy, a.xy, x), hue); + } + + float3 poiExpensiveColorBlend(float3 col1, float3 col2, float alpha) + { + return lch2rgb(lerpLch(rgb2lch(col1), rgb2lch(col2), alpha)); + } +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_FunctionsArtistic.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_FunctionsArtistic.cginc.meta new file mode 100644 index 00000000..5c2586ac --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_FunctionsArtistic.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 351026b075111b740ac5116fd810601c +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAlphaToCoverage.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAlphaToCoverage.cginc new file mode 100644 index 00000000..44c6fbc2 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAlphaToCoverage.cginc @@ -0,0 +1,32 @@ +#ifndef POI_ALPHA_TO_COVERAGE + #define POI_ALPHA_TO_COVERAGE + + half _MainMipScale; + float _MainAlphaToCoverage; + + float CalcMipLevel(float2 texture_coord) + { + float2 dx = ddx(texture_coord); + float2 dy = ddy(texture_coord); + float delta_max_sqr = max(dot(dx, dx), dot(dy, dy)); + + return 0.5 * log2(delta_max_sqr); + } + + void ApplyAlphaToCoverage(inout float4 finalColor) + { + // Force Model Opacity to 1 if desired + + if (float(0) == 1) + { + + if(float(0)) + { + // rescale alpha by mip level + finalColor.a *= 1 + max(0, CalcMipLevel(poiMesh.uv[0] * float4(0.0009765625,0.0009765625,1024,1024).zw)) * float(0.25); + // rescale alpha by partial derivative + finalColor.a = (finalColor.a - float(0.5)) / max(fwidth(finalColor.a), 0.0001) + float(0.5); + } + } + } +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAlphaToCoverage.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAlphaToCoverage.cginc.meta new file mode 100644 index 00000000..b87c7f32 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAlphaToCoverage.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1cad574f6b2e4cf48ab4d03240317fb9 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAudioLink.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAudioLink.cginc new file mode 100644 index 00000000..592dbf84 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAudioLink.cginc @@ -0,0 +1,127 @@ +#ifndef POI_AUDIOLINK +#define POI_AUDIOLINK + +UNITY_DECLARE_TEX2D(_AudioTexture); +float4 _AudioTexture_ST; +fixed _AudioLinkDelay; +fixed _AudioLinkAveraging; +fixed _AudioLinkAverageRange; + +// Debug +fixed _EnableAudioLinkDebug; +fixed _AudioLinkDebugTreble; +fixed _AudioLinkDebugHighMid; +fixed _AudioLinkDebugLowMid; +fixed _AudioLinkDebugBass; +fixed _AudioLinkDebugAnimate; +fixed _AudioLinkTextureVisualization; + +void AudioTextureExists() +{ + half testw = 0; + half testh = 0; + _AudioTexture.GetDimensions(testw, testh); + poiMods.audioLinkTextureExists = testw >= 32; + + switch(testw) + { + case 32: // V1 + poiMods.audioLinkVersion = 1; + break; + case 128: // V2 + poiMods.audioLinkVersion = 2; + break; + default: + poiMods.audioLinkVersion = 1; + break; + } +} + +float getBandAtTime(float band, fixed time, fixed width) +{ + float versionUvMultiplier = 1; + + if (poiMods.audioLinkVersion == 2) + { + versionUvMultiplier = 0.0625; + } + return UNITY_SAMPLE_TEX2D(_AudioTexture, float2(time * width, (band * .25 + .125) * versionUvMultiplier)).r; +} + +void initAudioBands() +{ + AudioTextureExists(); + + float versionUvMultiplier = 1; + + if (poiMods.audioLinkVersion == 2) + { + versionUvMultiplier = 0.0625; + } + + if (poiMods.audioLinkTextureExists) + { + poiMods.audioLink.x = UNITY_SAMPLE_TEX2D(_AudioTexture, float2(float(0), .125 * versionUvMultiplier)); + poiMods.audioLink.y = UNITY_SAMPLE_TEX2D(_AudioTexture, float2(float(0), .375 * versionUvMultiplier)); + poiMods.audioLink.z = UNITY_SAMPLE_TEX2D(_AudioTexture, float2(float(0), .625 * versionUvMultiplier)); + poiMods.audioLink.w = UNITY_SAMPLE_TEX2D(_AudioTexture, float2(float(0), .875 * versionUvMultiplier)); + + + if (float(0)) + { + float uv = saturate(float(0) + float(0.5) * .25); + poiMods.audioLink.x += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .125 * versionUvMultiplier)); + poiMods.audioLink.y += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .375 * versionUvMultiplier)); + poiMods.audioLink.z += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .625 * versionUvMultiplier)); + poiMods.audioLink.w += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .875 * versionUvMultiplier)); + + uv = saturate(float(0) + float(0.5) * .5); + poiMods.audioLink.x += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .125 * versionUvMultiplier)); + poiMods.audioLink.y += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .375 * versionUvMultiplier)); + poiMods.audioLink.z += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .625 * versionUvMultiplier)); + poiMods.audioLink.w += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .875 * versionUvMultiplier)); + + uv = saturate(float(0) + float(0.5) * .75); + poiMods.audioLink.x += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .125 * versionUvMultiplier)); + poiMods.audioLink.y += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .375 * versionUvMultiplier)); + poiMods.audioLink.z += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .625 * versionUvMultiplier)); + poiMods.audioLink.w += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .875 * versionUvMultiplier)); + + uv = saturate(float(0) + float(0.5)); + poiMods.audioLink.x += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .125 * versionUvMultiplier)); + poiMods.audioLink.y += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .375 * versionUvMultiplier)); + poiMods.audioLink.z += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .625 * versionUvMultiplier)); + poiMods.audioLink.w += UNITY_SAMPLE_TEX2D(_AudioTexture, float2(uv, .875 * versionUvMultiplier)); + + poiMods.audioLink /= 5; + } + } + + #ifndef OPTIMIZER_ENABLED + + if (float(0)) + { + poiMods.audioLink.x = float(0); + poiMods.audioLink.y = float(0); + poiMods.audioLink.z = float(0); + poiMods.audioLink.w = float(0); + + if (float(0)) + { + poiMods.audioLink.x *= (sin(_Time.w * 3.1) + 1) * .5; + poiMods.audioLink.y *= (sin(_Time.w * 3.2) + 1) * .5; + poiMods.audioLink.z *= (sin(_Time.w * 3.3) + 1) * .5; + poiMods.audioLink.w *= (sin(_Time.w * 3) + 1) * .5; + } + poiMods.audioLinkTextureExists = 1; + } + + + if(float(0)) + { + poiMods.audioLinkTexture = UNITY_SAMPLE_TEX2D(_AudioTexture, poiMesh.uv[0]); + } + #endif +} + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAudioLink.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAudioLink.cginc.meta new file mode 100644 index 00000000..5550cb79 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiAudioLink.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 81f43b904fba29e4baed48675cb41269 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBRDF.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBRDF.cginc new file mode 100644 index 00000000..1c2aacd3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBRDF.cginc @@ -0,0 +1,253 @@ +#ifndef POI_BRDF + #define POI_BRDF + + /* + * MIT License + * + * Copyright (c) 2020 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. + */ + + #if defined(PROP_BRDFMETALLICGLOSSMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_BRDFMetallicGlossMap); + #endif + #if defined(PROP_BRDFSPECULARMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_BRDFSpecularMap); + #endif + #if defined(PROP_BRDFMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_BRDFMetallicMap); + #endif + + samplerCUBE _BRDFFallback; + + float _BRDFMetallic; + float _BRDFGlossiness; + float _BRDFReflectance; + float _BRDFAnisotropy; + float _BRDFReflectionsEnabled; + float _BRDFSpecularEnabled; + float _BRDFInvertGlossiness; + float _BRDFForceFallback; + + bool DoesReflectionProbeExist() + { + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiCam.reflectionDir, UNITY_SPECCUBE_LOD_STEPS); + bool probeExists = !(unity_SpecCube0_HDR.a == 0 && envSample.a == 0); + return probeExists && !float(0); + } + + float getGeometricSpecularAA(float3 normal) + { + float3 vNormalWsDdx = ddx(normal.xyz); + float3 vNormalWsDdy = ddy(normal.xyz); + float flGeometricRoughnessFactor = pow(saturate(max(dot(vNormalWsDdx.xyz, vNormalWsDdx.xyz), dot(vNormalWsDdy.xyz, vNormalWsDdy.xyz))), 0.333); + return max(0, flGeometricRoughnessFactor); + } + + float3 getAnisotropicReflectionVector(float3 viewDir, float3 bitangent, float3 tangent, float3 normal, float roughness, float anisotropy) + { + 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); + } + + float3 F_Schlick(float u, float3 f0) + { + return f0 + (1.0 - f0) * pow(1.0 - u, 5.0); + } + + float3 F_Schlick(const float3 f0, float f90, float VoH) + { + // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering" + float pow5 = 1.0 - VoH; + pow5 = pow5 * pow5 * pow5 * pow5 * pow5; + return f0 + (f90 - f0) * pow5; + } + + 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 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); + } + + 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); + } + + float3 getBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + // #if defined(UNITY_SPECCUBE_BOX_PROJECTION) // For some reason this doesn't work? + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax: boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + // #endif + return direction; + } + + float3 getDirectSpecular(float roughness, float ndh, float vdn, float ndl, float ldh, float3 f0, float3 halfVector, float3 tangent, float3 bitangent, float anisotropy) + { + #if !defined(LIGHTMAP_ON) + float rough = max(roughness * roughness, 0.0045); + float Dn = D_GGX(ndh, rough); + float3 F = F_Schlick(ldh, f0); + float V = V_SmithGGXCorrelated(vdn, ndl, rough); + float3 directSpecularNonAniso = max(0, (Dn * V) * F); + + anisotropy *= saturate(5.0 * roughness); + 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, tangent, bitangent, at, ab); + float3 directSpecularAniso = max(0, (D * V) * F); + + return lerp(directSpecularNonAniso, directSpecularAniso, saturate(abs(float(0) * 100))) * 3; // * 100 to prevent blending, blend because otherwise tangents are fucked on lightmapped object + #else + return 0; + #endif + } + + float3 getIndirectSpecular(float metallic, float roughness, float3 reflDir, float3 worldPos, float3 lightmap, float3 normal) + { + float3 spec = float3(0, 0, 0); + #if defined(UNITY_PASS_FORWARDBASE) + float3 indirectSpecular; + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getBoxProjection( + reflDir, worldPos, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float interpolator = unity_SpecCube0_BoxMin.w; + + if (interpolator < 0.99999) + { + envData.reflUVW = getBoxProjection( + reflDir, worldPos, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube0_HDR, envData); + indirectSpecular = lerp(probe1, probe0, interpolator); + } + else + { + indirectSpecular = probe0; + } + + if(!DoesReflectionProbeExist()) + { + indirectSpecular = texCUBElod(_BRDFFallback, float4(envData.reflUVW, roughness * UNITY_SPECCUBE_LOD_STEPS)).rgb * poiLight.finalLighting; + } + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular *= horizon * horizon; + + spec = indirectSpecular; + #if defined(LIGHTMAP_ON) + float specMultiplier = max(0, lerp(1, pow(length(lightmap), float(0.2)), float(0))); + spec *= specMultiplier; + #endif + #endif + return spec; + } + + void poiBRDF(inout float4 finalColor, const float4 finalColorBeforeLighting) + { + float4 ret = float4(1, 0, 0, 1); + #if defined(PROP_BRDFMETALLICGLOSSMAP) || !defined(OPTIMIZER_ENABLED) + float4 metallicGlossMap = POI2D_SAMPLER_PAN(_BRDFMetallicGlossMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 metallicGlossMap = 1; + #endif + #if defined(PROP_BRDFSPECULARMAP) || !defined(OPTIMIZER_ENABLED) + float4 spcularTintMask = POI2D_SAMPLER_PAN(_BRDFSpecularMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 spcularTintMask = 1; + #endif + #if defined(PROP_BRDFMETALLICMAP) || !defined(OPTIMIZER_ENABLED) + float4 metallicTintMask = POI2D_SAMPLER_PAN(_BRDFMetallicMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 metallicTintMask = 1; + #endif + + if(float(0) == 1) + { + metallicGlossMap.a = 1 - metallicGlossMap.a; + } + + float metallic = metallicGlossMap.r * float(0); + float reflectance = metallicGlossMap.g * float(0.5); + float roughness = max(1 - (float(0) * metallicGlossMap.a), getGeometricSpecularAA(poiMesh.normals[1])); + finalColor.rgb *= lerp(1, 1 - metallic, float(1)); + + float3 reflViewDir = getAnisotropicReflectionVector(poiCam.viewDir, poiMesh.binormal, poiMesh.tangent.xyz, poiMesh.normals[1], roughness, float(0)); + float3 reflLightDir = reflect(poiLight.direction, poiMesh.normals[1]); + + #if defined(FORWARD_BASE_PASS) || defined(POI_META_PASS) + float attenuation = poiMax(poiLight.rampedLightMap); + #endif + #ifdef FORWARD_ADD_PASS + float attenuation = saturate(poiLight.nDotL); + #endif + + + float3 f0 = 0.16 * reflectance * reflectance * (1.0 - metallic) + finalColorBeforeLighting.rgb * metallic; + float3 fresnel = lerp(F_Schlick(poiLight.nDotV, f0), f0, metallic); //Kill fresnel on metallics, it looks bad. + float3 directSpecular = getDirectSpecular(roughness, saturate(poiLight.nDotH), max(poiLight.nDotV, 0.000001), attenuation, saturate(poiLight.lDotH), f0, poiLight.halfDir, poiMesh.tangent.xyz, poiMesh.binormal, float(0)) * poiLight.attenuation * attenuation * poiLight.color; + directSpecular = min(directSpecular, poiLight.color); + + float3 vDirectSpecular = 0; + #ifdef VERTEXLIGHT_ON + for (int index = 0; index < 4; index ++) + { + float3 v0directSpecular = getDirectSpecular(roughness, saturate(poiLight.vDotNH[index]), max(poiLight.nDotV, 0.000001), attenuation, saturate(poiLight.lDotH), f0, poiLight.vHalfDir[index], poiMesh.tangent, poiMesh.binormal, float(0)) * poiLight.attenuation * poiLight.vAttenuationDotNL[index] * poiLight.vColor[index]; + vDirectSpecular += min(v0directSpecular, poiLight.vColor[index]); + } + #endif + + float3 indirectSpecular = getIndirectSpecular(metallic, roughness, reflViewDir, poiMesh.worldPos, /*directDiffuse*/ finalColor.rgb, poiMesh.normals[1]) * lerp(fresnel, f0, roughness); + float3 specular = indirectSpecular * float(1) * metallicTintMask.a * metallicTintMask.rgb * poiLight.occlusion + (directSpecular + vDirectSpecular) * float(1) * spcularTintMask.a * spcularTintMask.rgb; + finalColor.rgb += specular; + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBRDF.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBRDF.cginc.meta new file mode 100644 index 00000000..fb48c312 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBRDF.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ceba1f25a18ff704fa4052f291256a54 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBackFace.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBackFace.cginc new file mode 100644 index 00000000..f08beb28 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBackFace.cginc @@ -0,0 +1,37 @@ +#ifndef POI_BACKFACE + #define POI_BACKFACE + + float _BackFaceEnabled; + float _BackFaceTextureUV; + float _BackFaceDetailIntensity; + float _BackFaceEmissionStrength; + float2 _BackFacePanning; + float _BackFaceHueShift; + float4 _BackFaceColor; + + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_BackFaceTexture); float4 _BackFaceTexture_ST; + #endif + + float3 BackFaceColor; + void applyBackFaceTexture(inout float backFaceDetailIntensity, inout float mixedHueShift, inout float4 albedo, inout float3 backFaceEmission) + { + backFaceEmission = 0; + BackFaceColor = 0; + + if (float(0)) + { + if(!poiMesh.isFrontFace) + { + #if defined(PROP_BACKFACETEXTURE) || !defined(OPTIMIZER_ENABLED) + albedo = POI2D_SAMPLER_PAN(_BackFaceTexture, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)) * float4(1,1,1,1); + #endif + backFaceDetailIntensity = float(1); + BackFaceColor = albedo.rgb; + mixedHueShift = float(0); + backFaceEmission = BackFaceColor * float(0); + } + } + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBackFace.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBackFace.cginc.meta new file mode 100644 index 00000000..0d4968eb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBackFace.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 317d31c6dfa1ae44b9667ba2e3381244 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlackLight.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlackLight.cginc new file mode 100644 index 00000000..8948e973 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlackLight.cginc @@ -0,0 +1,56 @@ +#ifndef POI_BLACKLIGHT + #define POI_BLACKLIGHT + + float4 _BlackLightMaskStart; + float4 _BlackLightMaskEnd; + float4 _BlackLightMaskKeys; + float _BlackLightMaskDebug; + float _BlackLightMaskDissolve; + float _BlackLightAdjustDissolve; + float _BlackLightMaskMetallic; + float _BlackLightMaskClearCoat; + float _BlackLightMaskMatcap; + float _BlackLightMaskMatcap2; + float _BlackLightMaskEmission; + float _BlackLightMaskEmission2; + float _BlackLightMaskFlipbook; + float _BlackLightMaskPanosphere; + float _BlackLightMaskIridescence; + float _BlackLightMove; + + half _BlackLightMaskGlitter; + + half4 blackLightMask; + + void createBlackLightMask() + { + blackLightMask = 0; + #ifdef VERTEXLIGHT_ON + + for (int lightIndex = 0; lightIndex < 4; lightIndex ++) + { + float3 lightPos = float3(unity_4LightPosX0[lightIndex], unity_4LightPosY0[lightIndex], unity_4LightPosZ0[lightIndex]); + if (!distance(unity_LightColor[lightIndex].rgb, float3(0, 0, 0))) + { + for (int maskIndex = 0; maskIndex < 4; maskIndex ++) + { + float4 comparison = float4(2,3,4,5); + if(unity_LightColor[lightIndex].a == comparison[maskIndex]) + { + blackLightMask[maskIndex] = max(blackLightMask[maskIndex], smoothstep(float4(1,1,1,1)[maskIndex], float4(0,0,0,0)[maskIndex], distance(poiMesh.worldPos, lightPos))); + } + } + } + } + #endif + } +#endif + +/* +#ifdef POI_BLACKLIGHT + if (float(4) != 4) + { + blackLightMask[mask]; + } +#endif +*/ diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlackLight.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlackLight.cginc.meta new file mode 100644 index 00000000..aae3e20f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlackLight.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 278dcf033f855d04e9e2e72d083a2400 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlending.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlending.cginc new file mode 100644 index 00000000..da2630db --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlending.cginc @@ -0,0 +1,386 @@ +#ifndef POI_BLENDING + #define POI_BLENDING + + /* + 0: Zero float4(0.0, 0.0, 0.0, 0.0), + 1: One float4(1.0, 1.0, 1.0, 1.0), + 2: DstColor destinationColor, + 3: SrcColor sourceColor, + 4: OneMinusDstColor float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + 5: SrcAlpha sourceColor.aaaa, + 6: OneMinusSrcColor float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + 7: DstAlpha destinationColor.aaaa, + 8: OneMinusDstAlpha float4(1.0, 1.0, 1.0, 1.0) - destinationColor., + 9: SrcAlphaSaturate saturate(sourceColor.aaaa), + 10: OneMinusSrcAlpha float4(1.0, 1.0, 1.0, 1.0) - sourceColor.aaaa, + */ + + float4 poiBlend(const float sourceFactor, const float4 sourceColor, const float destinationFactor, const float4 destinationColor, const float4 blendFactor) + { + float4 sA = 1 - blendFactor; + const float4 blendData[11] = { + float4(0.0, 0.0, 0.0, 0.0), + float4(1.0, 1.0, 1.0, 1.0), + destinationColor, + sourceColor, + float4(1.0, 1.0, 1.0, 1.0) - destinationColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sourceColor, + sA, + float4(1.0, 1.0, 1.0, 1.0) - sA, + saturate(sourceColor.aaaa), + 1 - sA, + }; + + return lerp(blendData[sourceFactor] * sourceColor + blendData[destinationFactor] * destinationColor, sourceColor, sA); + } + + // Average + float3 blendAverage(float3 base, float3 blend) + { + return(base + blend) / 2.0; + } + + // Color burn + float blendColorBurn(float base, float blend) + { + return(blend == 0.0)?blend: max((1.0 - ((1.0 - base) / blend)), 0.0); + } + + float3 blendColorBurn(float3 base, float3 blend) + { + return float3(blendColorBurn(base.r, blend.r), blendColorBurn(base.g, blend.g), blendColorBurn(base.b, blend.b)); + } + + // Color Dodge + float blendColorDodge(float base, float blend) + { + return(blend == 1.0)?blend: min(base / (1.0 - blend), 1.0); + } + + float3 blendColorDodge(float3 base, float3 blend) + { + return float3(blendColorDodge(base.r, blend.r), blendColorDodge(base.g, blend.g), blendColorDodge(base.b, blend.b)); + } + + // Darken + float blendDarken(float base, float blend) + { + return min(blend, base); + } + + float3 blendDarken(float3 base, float3 blend) + { + return float3(blendDarken(base.r, blend.r), blendDarken(base.g, blend.g), blendDarken(base.b, blend.b)); + } + + // Exclusion + float3 blendExclusion(float3 base, float3 blend) + { + return base + blend - 2.0 * base * blend; + } + + // Reflect + float blendReflect(float base, float blend) + { + return(blend == 1.0)?blend: min(base * base / (1.0 - blend), 1.0); + } + + float3 blendReflect(float3 base, float3 blend) + { + return float3(blendReflect(base.r, blend.r), blendReflect(base.g, blend.g), blendReflect(base.b, blend.b)); + } + + // Glow + float3 blendGlow(float3 base, float3 blend) + { + return blendReflect(blend, base); + } + + // Overlay + float blendOverlay(float base, float blend) + { + return base < 0.5?(2.0 * base * blend): (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)); + } + + float3 blendOverlay(float3 base, float3 blend) + { + return float3(blendOverlay(base.r, blend.r), blendOverlay(base.g, blend.g), blendOverlay(base.b, blend.b)); + } + + // Hard Light + float3 blendHardLight(float3 base, float3 blend) + { + return blendOverlay(blend, base); + } + + // Vivid light + float blendVividLight(float base, float blend) + { + return(blend < 0.5)?blendColorBurn(base, (2.0 * blend)): blendColorDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendVividLight(float3 base, float3 blend) + { + return float3(blendVividLight(base.r, blend.r), blendVividLight(base.g, blend.g), blendVividLight(base.b, blend.b)); + } + + // Hard mix + float blendHardMix(float base, float blend) + { + return(blendVividLight(base, blend) < 0.5)?0.0: 1.0; + } + + float3 blendHardMix(float3 base, float3 blend) + { + return float3(blendHardMix(base.r, blend.r), blendHardMix(base.g, blend.g), blendHardMix(base.b, blend.b)); + } + + // Lighten + float blendLighten(float base, float blend) + { + return max(blend, base); + } + + float3 blendLighten(float3 base, float3 blend) + { + return float3(blendLighten(base.r, blend.r), blendLighten(base.g, blend.g), blendLighten(base.b, blend.b)); + } + + // Linear Burn + float blendLinearBurn(float base, float blend) + { + // Note : Same implementation as BlendSubtractf + return max(base + blend - 1.0, 0.0); + } + + float3 blendLinearBurn(float3 base, float3 blend) + { + // Note : Same implementation as BlendSubtract + return max(base + blend - float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0)); + } + + // Linear Dodge + float blendLinearDodge(float base, float blend) + { + // Note : Same implementation as BlendAddf + return min(base + blend, 1.0); + } + + float3 blendLinearDodge(float3 base, float3 blend) + { + // Note : Same implementation as BlendAdd + return min(base + blend, float3(1.0, 1.0, 1.0)); + } + + // Linear light + float blendLinearLight(float base, float blend) + { + return blend < 0.5?blendLinearBurn(base, (2.0 * blend)): blendLinearDodge(base, (2.0 * (blend - 0.5))); + } + + float3 blendLinearLight(float3 base, float3 blend) + { + return float3(blendLinearLight(base.r, blend.r), blendLinearLight(base.g, blend.g), blendLinearLight(base.b, blend.b)); + } + + // Multiply + float3 blendMultiply(float3 base, float3 blend) + { + return base * blend; + } + + // Negation + float3 blendNegation(float3 base, float3 blend) + { + return float3(1.0, 1.0, 1.0) - abs(float3(1.0, 1.0, 1.0) - base - blend); + } + + // Normal + float3 blendNormal(float3 base, float3 blend) + { + return blend; + } + + // Phoenix + float3 blendPhoenix(float3 base, float3 blend) + { + return min(base, blend) - max(base, blend) + float3(1.0, 1.0, 1.0); + } + + // Pin light + float blendPinLight(float base, float blend) + { + return(blend < 0.5)?blendDarken(base, (2.0 * blend)): blendLighten(base, (2.0 * (blend - 0.5))); + } + + float3 blendPinLight(float3 base, float3 blend) + { + return float3(blendPinLight(base.r, blend.r), blendPinLight(base.g, blend.g), blendPinLight(base.b, blend.b)); + } + + // Screen + float blendScreen(float base, float blend) + { + return 1.0 - ((1.0 - base) * (1.0 - blend)); + } + + float3 blendScreen(float3 base, float3 blend) + { + return float3(blendScreen(base.r, blend.r), blendScreen(base.g, blend.g), blendScreen(base.b, blend.b)); + } + + // Soft Light + float blendSoftLight(float base, float blend) + { + return(blend < 0.5)?(2.0 * base * blend + base * base * (1.0 - 2.0 * blend)): (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)); + } + + float3 blendSoftLight(float3 base, float3 blend) + { + return float3(blendSoftLight(base.r, blend.r), blendSoftLight(base.g, blend.g), blendSoftLight(base.b, blend.b)); + } + + // Subtract + float blendSubtract(float base, float blend) + { + return max(base - blend, 0.0); + } + + float3 blendSubtract(float3 base, float3 blend) + { + return max(base - blend, 0.0); + } + + // Difference + float blendDifference(float base, float blend) + { + return abs(base - blend); + } + + float3 blendDifference(float3 base, float3 blend) + { + return abs(base - blend); + } + + // Divide + float blendDivide(float base, float blend) + { + return base / max(blend, 0.0001); + } + + float3 blendDivide(float3 base, float3 blend) + { + return base / max(blend, 0.0001); + } + + float3 customBlend(float3 base, float3 blend, float blendType) + { + float3 ret = 0; + switch(blendType) + { + case 0: + { + ret = blendNormal(base, blend); + break; + } + case 1: + { + ret = blendDarken(base, blend); + break; + } + case 2: + { + ret = blendMultiply(base, blend); + break; + } + case 3: + { + ret = blendColorBurn(base, blend); + break; + } + case 4: + { + ret = blendLinearBurn(base, blend); + break; + } + case 5: + { + ret = blendLighten(base, blend); + break; + } + case 6: + { + ret = blendScreen(base, blend); + break; + } + case 7: + { + ret = blendColorDodge(base, blend); + break; + } + case 8: + { + ret = blendLinearDodge(base, blend); + break; + } + case 9: + { + ret = blendOverlay(base, blend); + break; + } + case 10: + { + ret = blendSoftLight(base, blend); + break; + } + case 11: + { + ret = blendHardLight(base, blend); + break; + } + case 12: + { + ret = blendVividLight(base, blend); + break; + } + case 13: + { + ret = blendLinearLight(base, blend); + break; + } + case 14: + { + ret = blendPinLight(base, blend); + break; + } + case 15: + { + ret = blendHardMix(base, blend); + break; + } + case 16: + { + ret = blendDifference(base, blend); + break; + } + case 17: + { + ret = blendExclusion(base, blend); + break; + } + case 18: + { + ret = blendSubtract(base, blend); + break; + } + case 19: + { + ret = blendDivide(base, blend); + break; + } + } + return ret; + } +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlending.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlending.cginc.meta new file mode 100644 index 00000000..0226c763 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBlending.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 052bc45cc122e634d9c32164f85b23cf +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBulge.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBulge.cginc new file mode 100644 index 00000000..9162579c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBulge.cginc @@ -0,0 +1,41 @@ +#ifndef POI_BULGE + #define POI_BULGE + + float _BuldgeFadeLength; + float _BuldgeHeight; + + #if defined(PROP_BULGEMASK) || !defined(OPTIMIZER_ENABLED) + sampler2D _BulgeMask; + #endif + + void bulgyWolgy(inout v2f o) + { + float depth = DecodeFloatRG(tex2Dlod(_CameraDepthTexture, float4(o.grabPos.xy / o.grabPos.w, 0, 0))); + #if defined(PROP_BULGEMASK) || !defined(OPTIMIZER_ENABLED) + float bulgeMask = tex2Dlod(_BulgeMask, float4(o.uv0.xy, 0, 0)); + #else + float bulgeMask = 1.0; + #endif + + depth = Linear01Depth(depth); + + float intersect = 0; + if (depth != 1) + { + float diff = distance(depth, Linear01Depth(o.pos.z / o.pos.w)); + if(diff > 0) + { + intersect = 1 - smoothstep(0, _ProjectionParams.w * float(0.02), diff); + } + } + float4 offset = intersect * float(0.02) * float4(o.normal, 0); + + offset = IsInMirror() ? 0: offset; + offset *= bulgeMask; + + o.worldPos = mul(unity_ObjectToWorld, o.localPos) + offset; + o.localPos = mul(unity_WorldToObject, o.worldPos); + o.pos = UnityObjectToClipPos(o.localPos); + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBulge.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBulge.cginc.meta new file mode 100644 index 00000000..075e0b12 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiBulge.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1470001b2def8584db9863ecf374cd93 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiClearCoat.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiClearCoat.cginc new file mode 100644 index 00000000..ce1084bd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiClearCoat.cginc @@ -0,0 +1,327 @@ +#ifndef POI_CLEARCOAT + #define POI_CLEARCOAT + + float _Clearcoat; + float _ClearcoatGlossiness; + float _ClearcoatAnisotropy; + float _ClearcoatForceFallback; + float _ClearcoatEnableReflections; + float _ClearcoatEnableSpecular; + float _ClearcoatInvertSmoothness; + #if defined(PROP_CLEARCOATMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_ClearcoatMap); + #endif + + samplerCUBE _ClearcoatFallback; + /* + samplerCUBE _ClearCoatCubeMap; + float _ClearCoatSampleWorld; + float _ClearcoatInvertSmoothness; + float _Clearcoat; + float3 _ClearCoatTint; + float _ClearCoatNormalToUse; + float _ClearCoatForceLighting; + float lighty_clear_boy_uwu_var; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_ClearCoatSmoothnessMap); + #endif + + float3 CalculateClearCoatEnvironmentalReflections() + { + float3 reflectionColor; + + #if defined(PROP_CLEARCOATSMOOTHNESSMAP) || !defined(OPTIMIZER_ENABLED) + float smoothnessMap = (POI2D_SAMPLER_PAN(_ClearCoatSmoothnessMap, _MainTex, poiMesh.uv[_ClearCoatSmoothnessMapUV], _ClearCoatSmoothnessMapPan)); + #else + float smoothnessMap = 1.0; + #endif + + if (float(0) == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= _ClearCoatSmoothness; + float roughness = 1 - smoothnessMap; + + lighty_clear_boy_uwu_var = 0; + + float3 reflectedDir = _ClearCoatNormalToUse == 0 ? poiCam.vertexReflectionDir: poiCam.reflectionDir; + + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool no_probe = unity_SpecCube0_HDR.a == 0 && envSample.a == 0; + + + if(_ClearCoatSampleWorld == 0 && no_probe == 0) + { + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectedDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + + if(interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflectionColor = lerp(probe1, probe0, interpolator); + } + else + { + reflectionColor = probe0; + } + } + else + { + lighty_clear_boy_uwu_var = 1; + reflectionColor = texCUBElod(_ClearCoatCubeMap, float4(reflectedDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + } + + if(_ClearCoatForceLighting) + { + lighty_clear_boy_uwu_var = 1; + } + + return reflectionColor * _ClearCoatTint; + } + + void calculateAndApplyClearCoat(inout float4 finalColor) + { + #if defined(PROP_CLEARCOATMASK) || !defined(OPTIMIZER_ENABLED) + half clearCoatMap = POI2D_SAMPLER_PAN(_ClearcoatMap, _MainTex, poiMesh.uv[_ClearCoatMaskUV], _ClearCoatMaskPan); + #else + half clearCoatMap = 1; + #endif + + #ifdef POI_BLACKLIGHT + if(float(4) != 4) + { + clearCoatMap *= blackLightMask[float(4)]; + } + #endif + + half3 reflectionColor = CalculateClearCoatEnvironmentalReflections(); + + float NormalDotView = abs(dot(float(1), _ClearCoatNormalToUse == 0 ? poiLight.N0DotV: poiLight.nDotV).r); + #ifdef POI_LIGHTING + finalColor.rgb = lerp(finalColor.rgb, reflectionColor * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var), clearCoatMap * float(1) * clamp(FresnelTerm(float(1), NormalDotView), 0, 1)); + //finalColor.rgb += reflectionColor; + //finalColor.rgb = finalColor.rgb * (1- (reflectionColor.r + reflectionColor.g + reflectionColor.b)/3) + reflectionColor * clearCoatMap * lerp(1, poiLight.finalLighting, lighty_clear_boy_uwu_var); + #else + finalColor.rgb = lerp(finalColor.rgb, reflectionColor, clearCoatMap * float(1) * clamp(FresnelTerm(float(1), NormalDotView), 0, 1)); + #endif + } + */ + + bool clearcoatDoesReflectionProbeExist() + { + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiCam.reflectionDir, UNITY_SPECCUBE_LOD_STEPS); + bool probeExists = !(unity_SpecCube0_HDR.a == 0 && envSample.a == 0); + return probeExists && !float(0); + } + + float3 clearcoatF_Schlick(float u, float3 f0) + { + return f0 + (1.0 - f0) * pow(1.0 - u, 5.0); + } + + float4 getClearcoatSmoothness(float4 clearcoatMap) + { + float roughness = 1 - (float(0) * clearcoatMap.a); + roughness = clamp(roughness, 0.0045, 1.0); + roughness = roughness * roughness; + + float reflectivity = float(1) * clearcoatMap.r; + return float4(reflectivity, 0, 0, roughness); + } + + float getGeometricClearCoatSpecularAA(float3 normal) + { + float3 vNormalWsDdx = ddx(normal.xyz); + float3 vNormalWsDdy = ddy(normal.xyz); + float flGeometricRoughnessFactor = pow(saturate(max(dot(vNormalWsDdx.xyz, vNormalWsDdx.xyz), dot(vNormalWsDdy.xyz, vNormalWsDdy.xyz))), 0.333); + return max(0, flGeometricRoughnessFactor); + } + + float3 getClearcoatAnisotropicReflectionVector(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); + } + + float D_GGXClearcoat(float NoH, float roughness) + { + float a2 = roughness * roughness; + float f = (NoH * a2 - NoH) * NoH + 1.0; + return a2 / (UNITY_PI * f * f); + } + + float D_GGXClearcoat_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_SmithGGXClearcoatCorrelated(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); + } + + float3 getClearcoatDirectSpecular(float roughness, float ndh, float vdn, float ndl, float ldh, float3 f0, float3 halfVector, float3 tangent, float3 bitangent, float anisotropy) + { + #if !defined(LIGHTMAP_ON) + float rough = max(roughness * roughness, 0.0045); + float Dn = D_GGXClearcoat(ndh, rough); + float3 F = clearcoatF_Schlick(ldh, f0); + float V = V_SmithGGXClearcoatCorrelated(vdn, ndl, rough); + float3 directSpecularNonAniso = max(0, (Dn * V) * F); + + anisotropy *= saturate(5.0 * roughness); + float at = max(rough * (1.0 + anisotropy), 0.001); + float ab = max(rough * (1.0 - anisotropy), 0.001); + float D = D_GGXClearcoat_Anisotropic(ndh, halfVector, tangent, bitangent, at, ab); + float3 directSpecularAniso = max(0, (D * V) * F); + + return lerp(directSpecularNonAniso, directSpecularAniso, saturate(abs(float(0) * 100))) * 3; // * 100 to prevent blending, blend because otherwise tangents are fucked on lightmapped object + #else + return 0; + #endif + } + + float3 getClearCoatBoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + // #if defined(UNITY_SPECCUBE_BOX_PROJECTION) // For some reason this doesn't work? + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax: boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + // #endif + return direction; + } + + float3 getClearcoatIndirectSpecular(float metallic, float roughness, float3 reflDir, float3 worldPos, float3 lightmap, float3 normal) + { + float3 spec = float3(0, 0, 0); + #if defined(UNITY_PASS_FORWARDBASE) + float3 indirectSpecular; + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = getClearCoatBoxProjection( + reflDir, worldPos, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData); + float interpolator = unity_SpecCube0_BoxMin.w; + + if (interpolator < 0.99999) + { + envData.reflUVW = getClearCoatBoxProjection( + reflDir, worldPos, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + float3 probe1 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), unity_SpecCube0_HDR, envData); + indirectSpecular = lerp(probe1, probe0, interpolator); + } + else + { + indirectSpecular = probe0; + } + + if(!clearcoatDoesReflectionProbeExist()) + { + indirectSpecular = texCUBElod(_ClearcoatFallback, float4(envData.reflUVW, roughness * UNITY_SPECCUBE_LOD_STEPS)).rgb * poiLight.finalLighting; + } + + float horizon = min(1 + dot(reflDir, normal), 1); + indirectSpecular *= horizon * horizon; + + spec = indirectSpecular; + #if defined(LIGHTMAP_ON) + float specMultiplier = max(0, lerp(1, pow(length(lightmap), float(0.2)), float(0))); + spec *= specMultiplier; + #endif + #endif + return spec; + } + + void calculateAndApplyClearCoat(inout float4 finalColor) + { + #if defined(PROP_CLEARCOATMAP) || !defined(OPTIMIZER_ENABLED) + float4 clearCoatMap = POI2D_SAMPLER_PAN(_ClearcoatMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 clearCoatMap = 1; + #endif + + float4 clearcoatReflectivitySmoothness = getClearcoatSmoothness(clearCoatMap); + float clearcoatReflectivity = clearcoatReflectivitySmoothness.r; + float clearcoatRoughness = clearcoatReflectivitySmoothness.a; + + if(float(0)) + { + clearcoatRoughness = 1 - clearcoatRoughness; + } + float3 creflViewDir = getClearcoatAnisotropicReflectionVector(poiCam.viewDir, poiMesh.binormal, poiMesh.tangent.xyz, poiMesh.normals[0], clearcoatRoughness, float(0)); + float cndl = saturate(dot(poiLight.direction, poiMesh.normals[0])); + float cvdn = abs(dot(poiCam.viewDir, poiMesh.normals[0])); + float cndh = saturate(dot(poiMesh.normals[0], poiLight.halfDir)); + + float3 clearcoatf0 = 0.16 * clearcoatReflectivity * clearcoatReflectivity; + float3 clearcoatFresnel = clearcoatF_Schlick(cvdn, clearcoatf0); + + #if defined(FORWARD_BASE_PASS) || defined(POI_META_PASS) + float attenuation = poiLight.rampedLightMap; + #endif + #ifdef FORWARD_ADD_PASS + float attenuation = saturate(poiLight.nDotL); + #endif + + float3 vDirectSpecular = 0; + #ifdef VERTEXLIGHT_ON + for (int index = 0; index < 4; index ++) + { + float vcndh = saturate(dot(poiMesh.normals[0], poiLight.vHalfDir[index])); + float vcndl = saturate(dot(poiLight.vDirection[index], poiMesh.normals[0])); + float3 v0directSpecular = getClearcoatDirectSpecular(clearcoatRoughness, vcndh, cvdn, vcndl, saturate(poiLight.vDotLH[index]), clearcoatf0, poiLight.halfDir, poiMesh.tangent, poiMesh.binormal, float(0)) * poiLight.vAttenuation * vcndl * poiLight.vColor[index]; + vDirectSpecular += v0directSpecular; + } + #endif + + float3 clearcoatDirectSpecular = getClearcoatDirectSpecular(clearcoatRoughness, cndh, cvdn, attenuation, saturate(poiLight.lDotH), clearcoatf0, poiLight.halfDir, poiMesh.tangent, poiMesh.binormal, float(0)) * poiLight.attenuation * attenuation * poiLight.color; + float3 clearcoatIndirectSpecular = getClearcoatIndirectSpecular(0, clearcoatRoughness, creflViewDir, poiMesh.worldPos, finalColor, poiMesh.normals[0]); + float3 clearcoat = ((clearcoatDirectSpecular + vDirectSpecular) * clearCoatMap.g * float(1) + clearcoatIndirectSpecular * clearCoatMap.b * float(1)) * clearcoatReflectivity * clearcoatFresnel; + finalColor.rgb += clearcoat; + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiClearCoat.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiClearCoat.cginc.meta new file mode 100644 index 00000000..f16095da --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiClearCoat.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3d7fffa070769324a8457de259eb15c9 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiData.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiData.cginc new file mode 100644 index 00000000..31e4dcbd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiData.cginc @@ -0,0 +1,268 @@ +#ifndef POI_DATA +#define POI_DATA + +float _ParallaxBias; +float _LightingAdditiveLimitIntensity; +float _LightingAdditiveMaxIntensity; +POI_TEXTURE_NOSAMPLER(_BumpMap); +#ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DetailMask); + #endif + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DetailNormalMap); + #endif + float _DetailNormalMapScale; +#endif +float _BumpScale; + +void calculateAttenuation(v2f i) +{ + #ifdef FORWARD_ADD_PASS + #if defined(POINT) || defined(SPOT) + POI_LIGHT_ATTENUATION(attenuation, shadow, i, i.worldPos.xyz) + poiLight.additiveShadow = shadow; + #else + UNITY_LIGHT_ATTENUATION(attenuation, i, i.worldPos.xyz) + poiLight.additiveShadow == 0; + #endif + #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 FORWARD_BASE_PASS + if (all(_LightColor0.rgb == 0.0)) + { + attenuation = 1.0; + } + #endif + #endif + poiLight.attenuation = attenuation; +} + +void calculateVertexLightingData(in v2f i) +{ + #ifdef VERTEXLIGHT_ON + float4 toLightX = unity_4LightPosX0 - i.worldPos.x; + float4 toLightY = unity_4LightPosY0 - i.worldPos.y; + float4 toLightZ = unity_4LightPosZ0 - i.worldPos.z; + float4 lengthSq = 0; + lengthSq += toLightX * toLightX; + lengthSq += toLightY * toLightY; + lengthSq += toLightZ * toLightZ; + + float4 lightAttenSq = unity_4LightAtten0; + float4 atten = 1.0 / (1.0 + lengthSq * lightAttenSq); + float4 vLightWeight = saturate(1 - (lengthSq * lightAttenSq / 25)); + poiLight.vAttenuation = min(atten, vLightWeight * vLightWeight); + + poiLight.vDotNL = 0; + poiLight.vDotNL += toLightX * poiMesh.normals[1].x; + poiLight.vDotNL += toLightY * poiMesh.normals[1].y; + poiLight.vDotNL += toLightZ * poiMesh.normals[1].z; + + float4 corr = rsqrt(lengthSq); + poiLight.vDotNL = max(0, poiLight.vDotNL * corr); + poiLight.vAttenuationDotNL = poiLight.vAttenuation * poiLight.vDotNL; + + for (int index = 0; index < 4; index++) + { + poiLight.vPosition[index] = float3(unity_4LightPosX0[index], unity_4LightPosY0[index], unity_4LightPosZ0[index]); + + float3 vertexToLightSource = poiLight.vPosition[index] - poiMesh.worldPos; + poiLight.vDirection[index] = normalize(vertexToLightSource); + //poiLight.vAttenuationDotNL[index] = 1.0 / (1.0 + unity_4LightAtten0[index] * poiLight.vDotNL[index]); + poiLight.vColor[index] = unity_LightColor[index].rgb; + + if (float(0) == 1) + { + float intensity = max(0.001, (0.299 * poiLight.vColor[index].r + 0.587 * poiLight.vColor[index].g + 0.114 * poiLight.vColor[index].b)); + poiLight.vColor[index] = min(poiLight.vColor[index], poiLight.vColor[index] / (intensity / float(1))); + } + poiLight.vHalfDir[index] = Unity_SafeNormalize(poiLight.vDirection[index] + poiCam.viewDir); + poiLight.vDotNL[index] = dot(poiMesh.normals[1], -poiLight.vDirection[index]); + poiLight.vCorrectedDotNL[index] = .5 * (poiLight.vDotNL[index] + 1); + poiLight.vDotLH[index] = saturate(dot(poiLight.vDirection[index], poiLight.vHalfDir[index])); + + poiLight.vDotNH[index] = saturate(dot(poiMesh.normals[1], poiLight.vHalfDir[index])); + } + #endif +} + +void calculateLightingData(in v2f i) +{ + poiLight.occlusion = 1; + #ifdef FORWARD_BASE_PASS + //poiLight.color = saturate(_LightColor0.rgb) + saturate(ShadeSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb))); + float3 magic = max(ShadeSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb; + poiLight.color = magic + normalLight; + #else + #ifdef FORWARD_ADD_PASS + poiLight.color = _LightColor0.rgb; + + + if (float(0) == 1) + { + float additiveLightIntensity = max(0.001, (0.299 * poiLight.color.r + 0.587 * poiLight.color.g + 0.114 * poiLight.color.b)); + poiLight.color = min(poiLight.color, poiLight.color / (additiveLightIntensity / float(1))); + } + #endif + #endif + + #ifdef FORWARD_BASE_PASS + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + #else + #if defined(POINT) || defined(SPOT) + poiLight.direction = normalize(_WorldSpaceLightPos0.xyz - i.worldPos.xyz); + #else + poiLight.direction = _WorldSpaceLightPos0.xyz; + #endif + #endif + + poiLight.halfDir = normalize(poiLight.direction + poiCam.viewDir); + + #ifdef POI_VAR_DOTNH + poiLight.dotNH = saturate(dot(poiMesh.normals[1], poiLight.halfDir)); + #endif + + #ifdef POI_VAR_DOTLH + poiLight.dotLH = saturate(dot(poiLight.direction, poiLight.halfDir)); + #endif + + poiLight.nDotV = dot(poiMesh.normals[1], poiCam.viewDir); + poiLight.N0DotV = dot(poiMesh.normals[0], poiCam.viewDir); + poiLight.nDotL = dot(poiMesh.normals[1], poiLight.direction); + poiLight.nDotH = dot(poiMesh.normals[1], poiLight.halfDir); + poiLight.lDotv = dot(poiLight.direction, poiCam.viewDir); + poiLight.lDotH = dot(poiLight.direction, poiLight.halfDir); +} + +float3 CreateBinormal(float3 normal, float3 tangent, float binormalSign) +{ + return cross(normal, tangent.xyz) * (binormalSign * unity_WorldTransformParams.w); +} + +void InitializeMeshData(inout v2f i, uint facing) +{ + poiMesh.isFrontFace = facing; + poiMesh.normals[0] = normalize(i.normal); + poiMesh.binormal = CreateBinormal(i.normal, i.tangent.xyz, i.tangent.w); + poiMesh.tangent = i.tangent; + + #ifndef OUTLINE + if (!poiMesh.isFrontFace) + { + poiMesh.normals[0] *= -1; + poiMesh.tangent *= -1; + poiMesh.binormal *= -1; + } + #endif + + poiMesh.worldPos = i.worldPos.xyz; + poiMesh.localPos = i.localPos.xyz; + poiMesh.barycentricCoordinates = i.barycentricCoordinates; + poiMesh.uv[0] = i.uv0.xy; + poiMesh.uv[1] = i.uv0.zw; + poiMesh.uv[2] = i.uv1.xy; + poiMesh.uv[3] = i.uv1.zw; + + #ifdef POI_UV_DISTORTION + poiMesh.uv[4] = calculateDistortionUV(i.uv0.xy); + #else + poiMesh.uv[4] = poiMesh.uv[0]; + #endif + + poiMesh.vertexColor = i.vertexColor; + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + poiMesh.lightmapUV = i.lightmapUV; + #endif + poiMesh.modelPos = i.modelPos; + + #ifdef FUR + poiMesh.furAlpha = i.furAlpha; + #endif +} + +void initPoiMods() +{ + poiMods.audioLink = float4(0, 0, 0, 0); + poiMods.globalMasks = float4(0, 0, 0, 0); + #ifdef POI_AUDIOLINK + initAudioBands(); + #endif +} + +void initializeCamera(v2f i) +{ + poiCam.viewDir = normalize(_WorldSpaceCameraPos - i.worldPos.xyz); + poiCam.forwardDir = getCameraForward(); + poiCam.worldPos = _WorldSpaceCameraPos; + poiCam.distanceToModel = distance(poiMesh.modelPos, poiCam.worldPos); + poiCam.distanceToVert = distance(poiMesh.worldPos, poiCam.worldPos); + poiCam.grabPos = i.grabPos; + poiCam.screenUV = calcScreenUVs(i.grabPos); + poiCam.clipPos = i.pos; + #if defined(GRAIN) + poiCam.worldDirection = i.worldDirection; + #endif + + poiCam.tangentViewDir = normalize(i.tangentViewDir); + poiCam.decalTangentViewDir = poiCam.tangentViewDir; + poiCam.tangentViewDir.xy /= (poiCam.tangentViewDir.z + float(0.42)); +} + +void calculateTangentData() +{ + poiTData.tangentTransform = float3x3(poiMesh.tangent.xyz, poiMesh.binormal, poiMesh.normals[0]); + poiTData.tangentToWorld = transpose(float3x3(poiMesh.tangent.xyz, poiMesh.binormal, poiMesh.normals[0])); +} + +void CalculateReflectionData() +{ + #if defined(_METALLICGLOSSMAP) || defined(_COLORCOLOR_ON) + poiCam.reflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[1]); + poiCam.vertexReflectionDir = reflect(-poiCam.viewDir, poiMesh.normals[0]); + #endif +} + +void calculateNormals(inout half3 detailMask) +{ + half3 mainNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_BumpMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(1)); + + #ifdef FINALPASS + #if defined(PROP_DETAILMASK) || !defined(OPTIMIZER_ENABLED) + detailMask = POI2D_SAMPLER_PAN(_DetailMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).rgb; + #else + detailMask = 1; + #endif + + if (float(1) > 0) + { + #if defined(PROP_DETAILNORMALMAP) || !defined(OPTIMIZER_ENABLED) + half3 detailNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_DetailNormalMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(1) * detailMask.g); + poiMesh.tangentSpaceNormal = BlendNormals(mainNormal, detailNormal); + #else + poiMesh.tangentSpaceNormal = mainNormal; + #endif + } + else + { + poiMesh.tangentSpaceNormal = mainNormal; + } + #else + poiMesh.tangentSpaceNormal = mainNormal; + #endif + + #ifdef POI_RGBMASK + calculateRGBNormals(poiMesh.tangentSpaceNormal); + #endif + + poiMesh.normals[1] = normalize( + poiMesh.tangentSpaceNormal.x * poiMesh.tangent.xyz + + poiMesh.tangentSpaceNormal.y * poiMesh.binormal + + poiMesh.tangentSpaceNormal.z * poiMesh.normals[0] + ); + + poiCam.viewDotNormal = abs(dot(poiCam.viewDir, poiMesh.normals[1])); +} +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiData.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiData.cginc.meta new file mode 100644 index 00000000..7bd75e4e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiData.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ebf15a604845fef4aab2f3347d888bbc +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDebug.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDebug.cginc new file mode 100644 index 00000000..125d2cd9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDebug.cginc @@ -0,0 +1,107 @@ +#ifndef POI_DEBUG + #define POI_DEBUG + + float _DebugEnabled; + float _DebugMeshData; + float _DebugLightingData; + float _DebugCameraData; + + void displayDebugInfo(inout float4 finalColor) + { + + if (float(0) != 0) + { + //Mesh Data + if (float(0) == 1) + { + finalColor.rgb = poiMesh.normals[0]; + return; + } + else if(float(0) == 2) + { + finalColor.rgb = poiMesh.normals[1]; + return; + } + else if(float(0) == 3) + { + finalColor.rgb = poiMesh.tangent; + return; + } + else if(float(0) == 4) + { + finalColor.rgb = poiMesh.binormal; + return; + } + else if(float(0) == 5) + { + finalColor.rgb = poiMesh.localPos; + return; + } + + #ifdef POI_LIGHTING + if(float(0) == 1) + { + finalColor.rgb = poiLight.attenuation; + return; + } + else if(float(0) == 2) + { + finalColor.rgb = poiLight.directLighting; + return; + } + else if(float(0) == 3) + { + finalColor.rgb = poiLight.indirectLighting; + return; + } + else if(float(0) == 4) + { + finalColor.rgb = poiLight.lightMap; + return; + } + else if(float(0) == 5) + { + finalColor.rgb = poiLight.rampedLightMap; + return; + } + else if(float(0) == 6) + { + finalColor.rgb = poiLight.finalLighting; + return; + } + else if(float(0) == 7) + { + finalColor.rgb = poiLight.nDotL; + return; + } + #endif + + if(float(0) == 1) + { + finalColor.rgb = poiCam.viewDir; + return; + } + else if(float(0) == 2) + { + finalColor.rgb = poiCam.tangentViewDir; + return; + } + else if(float(0) == 3) + { + finalColor.rgb = poiCam.forwardDir; + return; + } + else if(float(0) == 4) + { + finalColor.rgb = poiCam.worldPos; + return; + } + else if(float(0) == 5) + { + finalColor.rgb = poiCam.viewDotNormal; + return; + } + } + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDebug.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDebug.cginc.meta new file mode 100644 index 00000000..0a164c35 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDebug.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f90bd1a49536ee14699f88eb33caa9ae +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDecal.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDecal.cginc new file mode 100644 index 00000000..83ac70d9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDecal.cginc @@ -0,0 +1,268 @@ +#ifndef POI_DECAL +#define POI_DECAL + + +#if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DecalMask); +#endif + +#if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DecalTexture); +#else + float2 _DecalTextureUV; +#endif +float4 _DecalColor; +fixed _DecalTiled; +float _DecalBlendType; +half _DecalRotation; +half2 _DecalScale; +half2 _DecalPosition; +half _DecalRotationSpeed; +float _DecalEmissionStrength; +float _DecalBlendAlpha; +float _DecalHueShiftEnabled; +float _DecalHueShift; +float _DecalHueShiftSpeed; + +// Audio Link +half _AudioLinkDecal0ScaleBand; +float4 _AudioLinkDecal0Scale; +half _AudioLinkDecal0AlphaBand; +float2 _AudioLinkDecal0Alpha; +half _AudioLinkDecal0EmissionBand; +float2 _AudioLinkDecal0Emission; + +half _AudioLinkDecal1ScaleBand; +float4 _AudioLinkDecal1Scale; +half _AudioLinkDecal1AlphaBand; +float2 _AudioLinkDecal1Alpha; +half _AudioLinkDecal1EmissionBand; +float2 _AudioLinkDecal1Emission; + +half _AudioLinkDecal2ScaleBand; +float4 _AudioLinkDecal2Scale; +half _AudioLinkDecal2AlphaBand; +float2 _AudioLinkDecal2Alpha; +half _AudioLinkDecal2EmissionBand; +float2 _AudioLinkDecal2Emission; + +half _AudioLinkDecal3ScaleBand; +float4 _AudioLinkDecal3Scale; +half _AudioLinkDecal3AlphaBand; +float2 _AudioLinkDecal3Alpha; +half _AudioLinkDecal3EmissionBand; +float2 _AudioLinkDecal3Emission; + +#ifdef GEOM_TYPE_BRANCH_DETAIL + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DecalTexture1); + #else + float2 _DecalTexture1UV; + #endif + float4 _DecalColor1; + fixed _DecalTiled1; + float _DecalBlendType1; + half _DecalRotation1; + half2 _DecalScale1; + half2 _DecalPosition1; + half _DecalRotationSpeed1; + float _DecalEmissionStrength1; + float _DecalBlendAlpha1; + float _DecalHueShiftEnabled1; + float _DecalHueShift1; + float _DecalHueShiftSpeed1; +#endif + +#ifdef GEOM_TYPE_FROND + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DecalTexture2); + #else + float2 _DecalTexture2UV; + #endif + float4 _DecalColor2; + fixed _DecalTiled2; + float _DecalBlendType2; + half _DecalRotation2; + half2 _DecalScale2; + half2 _DecalPosition2; + half _DecalRotationSpeed2; + float _DecalEmissionStrength2; + float _DecalBlendAlpha2; + float _DecalHueShiftEnabled2; + float _DecalHueShift2; + float _DecalHueShiftSpeed2; +#endif + +#ifdef DEPTH_OF_FIELD_COC_VIEW + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DecalTexture3); + #else + float2 _DecalTexture3UV; + #endif + float4 _DecalColor3; + fixed _DecalTiled3; + float _DecalBlendType3; + half _DecalRotation3; + half2 _DecalScale3; + half2 _DecalPosition3; + half _DecalRotationSpeed3; + float _DecalEmissionStrength3; + float _DecalBlendAlpha3; + float _DecalHueShiftEnabled3; + float _DecalHueShift3; + float _DecalHueShiftSpeed3; +#endif + +// Parallax +float _Decal0Depth; +float _Decal1Depth; +float _Decal2Depth; +float _Decal3Depth; + +float2 calcParallax(float height) +{ + return((height * - 1) + 1) * (poiCam.decalTangentViewDir.xy / poiCam.decalTangentViewDir.z); +} + + +float2 decalUV(float uvNumber, float2 position, half rotation, half rotationSpeed, half2 scale, float depth) +{ + float2 uv = poiMesh.uv[uvNumber] + calcParallax(depth + 1); + float2 decalCenter = position; + float theta = radians(rotation + _Time.z * rotationSpeed); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - decalCenter.x) * cs - (uv.y - decalCenter.y) * sn + decalCenter.x, (uv.x - decalCenter.x) * sn + (uv.y - decalCenter.y) * cs + decalCenter.y); + uv = remap(uv, float2(0, 0) - scale / 2 + position, scale / 2 + position, float2(0, 0), float2(1, 1)); + return uv; +} + +inline float3 decalHueShift(float enabled, float3 color, float shift, float shiftSpeed) +{ + + if (enabled) + { + color = hueShift(color, shift + _Time.x * shiftSpeed); + } + return color; +} + +inline float applyTilingClipping(float enabled, float2 uv) +{ + float ret = 1; + + if (!enabled) + { + if (uv.x > 1 || uv.y > 1 || uv.x < 0 || uv.y < 0) + { + ret = 0; + } + } + return ret; +} + +void applyDecals(inout float4 albedo, inout float3 decalEmission) +{ + + #if defined(PROP_DECALMASK) || !defined(OPTIMIZER_ENABLED) + float4 decalMask = POI2D_SAMPLER_PAN(_DecalMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 decalMask = 1; + #endif + + float4 decalColor = 1; + float2 uv = 0; + + // Decal 0 + float2 decalScale = float2(1, 1); + decalScale = float4(1,1,0,0); + #if defined(PROP_DECALTEXTURE) || !defined(OPTIMIZER_ENABLED) + #ifdef POI_AUDIOLINK + + if (poiMods.audioLinkTextureExists) + { + decalScale += lerp(float4(0,0,0,0).xy, float4(0,0,0,0).zw, poiMods.audioLink[float(0)]); + } + #endif + uv = decalUV(float(0), float4(0.5,0.5,0,0), float(0), float(0), decalScale, float(0)); + decalColor = POI2D_SAMPLER_PAN(_DecalTexture, _MainTex, uv, float4(0,0,0,0)) * float4(1,1,1,1); + #else + uv = decalUV(float(0), float4(0.5,0.5,0,0), float(0), float(0), decalScale, float(0)); + decalColor = float4(1,1,1,1); + #endif + decalColor.rgb = decalHueShift(float(0), decalColor.rgb, float(0), float(0)); + decalColor.a *= applyTilingClipping(float(0), uv) * decalMask.r; + albedo.rgb = lerp(albedo.rgb, customBlend(albedo.rgb, decalColor.rgb, float(0)), decalColor.a * saturate(float(1) + lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]))); + + decalEmission += decalColor.rgb * decalColor.a * max(float(0) + lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]), 0); + #ifdef GEOM_TYPE_BRANCH_DETAIL + // Decal 1 + decalScale = float4(1,1,0,0); + #if defined(PROP_DECALTEXTURE1) || !defined(OPTIMIZER_ENABLED) + #ifdef POI_AUDIOLINK + + if (poiMods.audioLinkTextureExists) + { + decalScale += lerp(float4(0,0,0,0).xy, float4(0,0,0,0).zw, poiMods.audioLink[float(0)]); + } + #endif + uv = decalUV(float(0), float4(0.5,0.5,0,0), float(0), float(0), decalScale, float(0)); + decalColor = POI2D_SAMPLER_PAN(_DecalTexture1, _MainTex, uv, float4(0,0,0,0)) * float4(1,1,1,1); + #else + uv = decalUV(float(0), float4(0.5,0.5,0,0), float(0), float(0), decalScale, float(0)); + decalColor = float4(1,1,1,1); + #endif + decalColor.rgb = decalHueShift(float(0), decalColor.rgb, float(0), float(0)); + decalColor.a *= applyTilingClipping(float(0), uv) * decalMask.g; + albedo.rgb = lerp(albedo.rgb, customBlend(albedo.rgb, decalColor.rgb, float(0)), decalColor.a * saturate(float(1) + lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]))); + decalEmission += decalColor.rgb * decalColor.a * max(float(0) + lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]), 0); + #endif + #ifdef GEOM_TYPE_FROND + // Decal 2 + decalScale = float4(1,1,0,0); + #if defined(PROP_DECALTEXTURE2) || !defined(OPTIMIZER_ENABLED) + #ifdef POI_AUDIOLINK + + if (poiMods.audioLinkTextureExists) + { + decalScale += lerp(float4(0,0,0,0).xy, float4(0,0,0,0).zw, poiMods.audioLink[float(0)]); + } + #endif + uv = decalUV(float(0), float4(0.5,0.5,0,0), float(0), float(0), decalScale, float(0)); + decalColor = POI2D_SAMPLER_PAN(_DecalTexture2, _MainTex, uv, float4(0,0,0,0)) * float4(1,1,1,1); + #else + uv = decalUV(float(0), float4(0.5,0.5,0,0), float(0), float(0), decalScale, float(0)); + decalColor = float4(1,1,1,1); + #endif + decalColor.rgb = decalHueShift(float(0), decalColor.rgb, float(0), float(0)); + decalColor.a *= applyTilingClipping(float(0), uv) * decalMask.b; + albedo.rgb = lerp(albedo.rgb, customBlend(albedo.rgb, decalColor.rgb, float(0)), decalColor.a * saturate(float(1) + lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]))); + decalEmission += decalColor.rgb * decalColor.a * max(float(0) + lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]), 0); + #endif + #ifdef DEPTH_OF_FIELD_COC_VIEW + // Decal 3 + decalScale = float4(1,1,0,0); + #if defined(PROP_DECALTEXTURE3) || !defined(OPTIMIZER_ENABLED) + #ifdef POI_AUDIOLINK + + if (poiMods.audioLinkTextureExists) + { + decalScale += lerp(float4(0,0,0,0).xy, float4(0,0,0,0).zw, poiMods.audioLink[float(0)]); + } + #endif + uv = decalUV(float(0), float4(0.5,0.5,0,0), float(0), float(0), decalScale, float(0)); + decalColor = POI2D_SAMPLER_PAN(_DecalTexture3, _MainTex, uv, float4(0,0,0,0)) * float4(1,1,1,1); + #else + uv = decalUV(float(0), float4(0.5,0.5,0,0), float(0), float(0), decalScale, float(0)); + decalColor = float4(1,1,1,1); + #endif + decalColor.rgb = decalHueShift(float(0), decalColor.rgb, float(0), float(0)); + decalColor.a *= applyTilingClipping(float(0), uv) * decalMask.a; + albedo.rgb = lerp(albedo.rgb, customBlend(albedo.rgb, decalColor.rgb, float(0)), decalColor.a * saturate(float(1) + lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]))); + decalEmission += decalColor.rgb * decalColor.a * max(float(0) + lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]), 0); + #endif + + albedo = saturate(albedo); +} + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDecal.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDecal.cginc.meta new file mode 100644 index 00000000..d2030bec --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDecal.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fb1060ee9073c9f44ba718b60492f89a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDefines.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDefines.cginc new file mode 100644 index 00000000..0422af76 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDefines.cginc @@ -0,0 +1,22 @@ +#ifndef POI_DEFINES + #define POI_DEFINES + + #define DielectricSpec float4(0.04, 0.04, 0.04, 1.0 - 0.04) + #define pi float(3.14159265359) + + #ifdef _SPECGLOSSMAP // Specular + #ifndef POI_VAR_DOTNH + #define POI_VAR_DOTNH + #endif + #ifndef POI_VAR_DOTLH + #define POI_VAR_DOTLH + #endif + #endif + + #ifdef VIGNETTE_MASKED // Lighting + #ifndef POI_VAR_DOTNL + #define POI_VAR_DOTNL + #endif + #endif + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDefines.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDefines.cginc.meta new file mode 100644 index 00000000..82586de7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDefines.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 09d2e7bf1a4080d498dcff3c1bf49f13 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDepthColor.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDepthColor.cginc new file mode 100644 index 00000000..0a4210e9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDepthColor.cginc @@ -0,0 +1,129 @@ +#ifndef POI_DEPTH_COLOR + #define POI_DEPTH_COLOR + + float4 _DepthGlowColor; + float _DepthGlowEmission; + float _FadeLength; + float _DepthAlphaMin; + float _DepthAlphaMax; + float _DepthGradientTextureUV; + float _DepthGradientBlend; + + #if defined(PROP_DEPTHGRADIENT) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DepthGradient); + #endif + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DepthMask); + #endif + + /* + void applyDepthColor(inout float4 finalColor, inout float3 depthTouchEmission, inout float3 finalEmission, float4 worldDirection, float4 clipPos) + { + float3 touchEmission = 0; + if (!IsInMirror()) + { + float fadeLength = float(20); + fadeLength *= 0.01; + float depth = DecodeFloatRG(tex2Dproj(_CameraDepthTexture, worldDirection)); + depth = Linear01Depth(depth); + if(depth != 1) + { + float diff = distance(depth, Linear01Depth(clipPos.z)); + float intersect = 0; + if(diff > 0) + { + intersect = clamp(1 - smoothstep(0, _ProjectionParams.w * fadeLength, diff), 0, 1); + } + half4 depthGradient = UNITY_SAMPLE_TEX2D_SAMPLER(_DepthGradient, _MainTex, intersect); + half3 depthMask = UNITY_SAMPLE_TEX2D_SAMPLER(_DepthMask, _MainTex, poiMesh.uv[0]); + half3 depthColor = depthGradient.rgb * float4(1,1,1,1).rgb; + finalColor.rgb = lerp(finalColor.rgb, depthColor, intersect * depthMask); + finalColor.a *= lerp(float(1), float(1), intersect); + touchEmission = depthColor * float(3) * intersect * depthMask; + } + } + depthTouchEmission = touchEmission; + } + */ + + inline float CorrectedLinearEyeDepth(float z, float B) + { + return 1.0 / (z / PM._34 + B); + } + + void applyDepthColor(inout float4 finalColor, inout float3 depthTouchEmission, inout float3 finalEmission, in float4 worldDirection) + { + float3 touchEmission = 0; + float fadeLength = float(20); + fadeLength *= 0.01; + + float perspectiveDivide = 1.0f / poiCam.clipPos.w; + float4 direction = worldDirection * perspectiveDivide; + float2 screenPos = poiCam.grabPos.xy * perspectiveDivide; + float z = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screenPos); + + #if UNITY_REVERSED_Z + if (z == 0) + #else + if(z == 1) + #endif + return; + + float depth = CorrectedLinearEyeDepth(z, direction.w); + float3 worldpos = direction * depth + _WorldSpaceCameraPos.xyz; + /* + finalColor.rgb = frac(worldpos); + return; + */ + + float diff = distance(worldpos, poiMesh.worldPos); + float intersect = 0; + intersect = clamp(1 - smoothstep(0, fadeLength, diff), 0, 1); + #if defined(PROP_DEPTHMASK) || !defined(OPTIMIZER_ENABLED) + half3 depthMask = POI2D_SAMPLER_PAN(_DepthMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + half3 depthMask = 1; + #endif + + half4 depthGradient = 0; + half3 depthColor = 0; + + + if (float(0) == 0) + { + #if defined(PROP_DEPTHGRADIENT) || !defined(OPTIMIZER_ENABLED) + depthGradient = POI2D_SAMPLER_PAN(_DepthGradient, _MainTex, float2(intersect, intersect), float4(0,0,0,0)); + #else + depthGradient = 1; + #endif + depthColor = depthGradient.rgb * float4(1,1,1,1).rgb; + } + else + { + #if defined(PROP_DEPTHGRADIENT) || !defined(OPTIMIZER_ENABLED) + depthGradient = POI2D_SAMPLER_PAN(_DepthGradient, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + depthGradient = 1; + #endif + depthColor = depthGradient.rgb * float4(1,1,1,1).rgb * intersect; + } + + + if(float(0) == 0) // rpelace + { + finalColor.rgb = lerp(finalColor.rgb, depthColor, intersect * depthMask); + } + else if (float(0) == 1) // add + { + finalColor.rgb += depthColor * intersect * depthMask; + } + else if (float(0) == 2) // multiply + { + finalColor.rgb *= lerp(1, depthColor, intersect * depthMask); + } + finalColor.a *= lerp(float(1), float(1), intersect * depthMask); + touchEmission = depthColor * float(3) * intersect * depthMask; + + depthTouchEmission = touchEmission; + } +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDepthColor.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDepthColor.cginc.meta new file mode 100644 index 00000000..aeebc27c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDepthColor.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6583b7ed242dd75408eb5373d23d42c8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDissolve.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDissolve.cginc new file mode 100644 index 00000000..5ea738d2 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDissolve.cginc @@ -0,0 +1,237 @@ +#ifndef POI_DISSOLVE +#define POI_DISSOLVE + +float _DissolveType; +float _DissolveEdgeWidth; +float4 _DissolveEdgeColor; +sampler2D _DissolveEdgeGradient; float4 _DissolveEdgeGradient_ST; +float _DissolveEdgeEmission; +float4 _DissolveTextureColor; + +#if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DissolveToTexture); +#endif + +#if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DissolveNoiseTexture); +#endif + +#if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DissolveDetailNoise); +#endif + +#if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DissolveMask); +#endif + +float _DissolveMaskInvert; +float _DissolveAlpha; +float _ContinuousDissolve; +float _DissolveDetailStrength; +float _DissolveEdgeHardness; +float _DissolveInvertNoise; +float _DissolveInvertDetailNoise; +float _DissolveToEmissionStrength; + +// Point to Point +float _DissolveP2PWorldLocal; +float _DissolveP2PEdgeLength; +float4 _DissolveStartPoint; +float4 _DissolveEndPoint; + +// World Dissolve +float _DissolveWorldShape; +float4 _DissolveShapePosition; +float4 _DissolveShapeRotation; +float _DissolveShapeScale; +float _DissolveInvertShape; +float _DissolveShapeEdgeLength; + +float _DissolveAlpha0; +float _DissolveAlpha1; +float _DissolveAlpha2; +float _DissolveAlpha3; +float _DissolveAlpha4; +float _DissolveAlpha5; +float _DissolveAlpha6; +float _DissolveAlpha7; +float _DissolveAlpha8; +float _DissolveAlpha9; +// Masking +float _DissolveEmissionSide; +float _DissolveEmission1Side; +float _DissolveUseVertexColors; + +// Audio Link +#ifdef POI_AUDIOLINK + fixed _EnableDissolveAudioLink; + half _AudioLinkDissolveAlphaBand; + float2 _AudioLinkDissolveAlpha; + half _AudioLinkDissolveDetailBand; + float2 _AudioLinkDissolveDetail; +#endif + +float4 edgeColor; +float edgeAlpha; +float dissolveAlpha; +float4 dissolveToTexture; + +float _DissolveHueShiftEnabled; +float _DissolveHueShiftSpeed; +float _DissolveHueShift; +float _DissolveEdgeHueShiftEnabled; +float _DissolveEdgeHueShiftSpeed; +float _DissolveEdgeHueShift; +void calculateDissolve(inout float4 albedo, inout float3 dissolveEmission) +{ + #if defined(PROP_DISSOLVEMASK) || !defined(OPTIMIZER_ENABLED) + float dissolveMask = POI2D_SAMPLER_PAN(_DissolveMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + float dissolveMask = 1; + #endif + + if (float(0)) + { + // Vertex Color Imprecision hype + dissolveMask = ceil(poiMesh.vertexColor.g * 100000) / 100000; + } + + #if defined(PROP_DISSOLVETOTEXTURE) || !defined(OPTIMIZER_ENABLED) + dissolveToTexture = POI2D_SAMPLER_PAN(_DissolveToTexture, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)) * float4(1,1,1,1); + #else + dissolveToTexture = float4(1,1,1,1); + #endif + + #if defined(PROP_DISSOLVENOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float dissolveNoiseTexture = POI2D_SAMPLER_PAN(_DissolveNoiseTexture, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + float dissolveNoiseTexture = 1; + #endif + + float da = float(0) + + float(0) + + float(0) + + float(0) + + float(0) + + float(0) + + float(0) + + float(0) + + float(0) + + float(0) + + float(0); + float dds = float(0.1); + + #ifdef POI_AUDIOLINK + + if (float(0) && poiMods.audioLinkTextureExists) + { + da += lerp(float4(0,0,-1,1).x, float4(0,0,-1,1).y, poiMods.audioLink[float(0)]); + dds += lerp(float4(0,0,-1,1).x, float4(0,0,-1,1).y, poiMods.audioLink[float(0)]); + } + #endif + + da = saturate(da); + dds = saturate(dds); + + #ifdef POI_BLACKLIGHT + if (float(4) != 4) + { + dissolveMask *= blackLightMask[float(4)]; + } + #endif + + if (float(0)) + { + dissolveMask = 1 - dissolveMask; + } + #if defined(PROP_DISSOLVEDETAILNOISE) || !defined(OPTIMIZER_ENABLED) + float dissolveDetailNoise = POI2D_SAMPLER_PAN(_DissolveDetailNoise, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float dissolveDetailNoise = 0; + #endif + if (float(0)) + { + dissolveNoiseTexture = 1 - dissolveNoiseTexture; + } + if (float(0)) + { + dissolveDetailNoise = 1 - dissolveDetailNoise; + } + if (float(0) != 0) + { + da = sin(_Time.y * float(0)) * .5 + .5; + } + da *= dissolveMask; + dissolveAlpha = da; + edgeAlpha = 0; + + + if (float(1) == 1) // Basic + + { + da = remap(da, 0, 1, -float(0.025), 1); + dissolveAlpha = da; + //Adjust detail strength to avoid artifacts + dds *= smoothstep(1, .99, da); + float noise = saturate(dissolveNoiseTexture - dissolveDetailNoise * dds); + + noise = saturate(noise + 0.001); + //noise = remap(noise, 0, 1, float(0.025), 1 - float(0.025)); + dissolveAlpha = dissolveAlpha >= noise; + edgeAlpha = remapClamped(noise, da + float(0.025), da, 0, 1) * (1 - dissolveAlpha); + } + else if (float(1) == 2) // Point to Point + + { + float3 direction; + float3 currentPos; + float distanceTo = 0; + direction = normalize(float4(0,1,0,0) - float4(0,-1,0,0)); + currentPos = lerp(float4(0,-1,0,0), float4(0,1,0,0), dissolveAlpha); + + + if (float(0) != 1) + { + float3 pos = float(0) == 0 ? poiMesh.localPos.rgb: poiMesh.vertexColor.rgb; + distanceTo = dot(pos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(float(0.1), 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + else + { + distanceTo = dot(poiMesh.worldPos - currentPos, direction) - dissolveDetailNoise * dds; + edgeAlpha = smoothstep(float(0.1), 0, distanceTo); + dissolveAlpha = step(distanceTo, 0); + edgeAlpha *= 1 - dissolveAlpha; + } + } + + #ifndef POI_SHADOW + + if (float(0)) + { + dissolveToTexture.rgb = hueShift(dissolveToTexture.rgb, float(0) + _Time.x * float(0)); + } + #endif + albedo = lerp(albedo, dissolveToTexture, dissolveAlpha); + + + if (float(0.025)) + { + edgeColor = tex2D(_DissolveEdgeGradient, TRANSFORM_TEX(float2(edgeAlpha, edgeAlpha), _DissolveEdgeGradient)) * float4(1,1,1,1); + #ifndef POI_SHADOW + + if (float(0)) + { + edgeColor.rgb = hueShift(edgeColor.rgb, float(0) + _Time.x * float(0)); + } + #endif + albedo.rgb = lerp(albedo.rgb, edgeColor.rgb, smoothstep(0, 1 - float(0.5) * .99999999999, edgeAlpha)); + } + + dissolveEmission = lerp(0, dissolveToTexture * float(0), dissolveAlpha) + lerp(0, edgeColor.rgb * float(0), smoothstep(0, 1 - float(0.5) * .99999999999, edgeAlpha)); +} + + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDissolve.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDissolve.cginc.meta new file mode 100644 index 00000000..9e736344 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDissolve.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 757b2789a8e5be0449313175eba52086 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDithering.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDithering.cginc new file mode 100644 index 00000000..91efad39 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDithering.cginc @@ -0,0 +1,34 @@ +#ifndef POI_DITHERING + #define POI_DITHERING + fixed _DitheringEnabled; + fixed _DitherGradient; + + half calcDither(half2 grabPos) + { + half dither = Dither8x8Bayer(fmod(grabPos.x, 8), fmod(grabPos.y, 8)); + return dither; + } + + #ifndef POI_SHADOW + void applyDithering(inout float4 finalColor) + { + + if (float(0)) + { + half dither = calcDither(poiCam.screenUV.xy); + finalColor.a = finalColor.a - (dither * (1 - finalColor.a) * float(0.1)); + } + } + #else + void applyShadowDithering(inout float alpha, float2 screenUV) + { + + if(float(0)) + { + half dither = calcDither(screenUV); + alpha = alpha - (dither * (1 - alpha) * float(0.1)); + } + } + #endif + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDithering.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDithering.cginc.meta new file mode 100644 index 00000000..2900b652 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiDithering.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: db8273090cf823b4687924c84fbd8bab +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEmission.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEmission.cginc new file mode 100644 index 00000000..71b13612 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEmission.cginc @@ -0,0 +1,341 @@ +#ifndef POI_EMISSION +#define POI_EMISSION + +float4 _EmissionColor; +#if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_EmissionMap); +#endif +#if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_EmissionMask); +#endif +#if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_EmissionScrollingCurve); float4 _EmissionScrollingCurve_ST; +#endif +float _EmissionBaseColorAsMap; +float _EmissionStrength; +float _EnableEmission; +float _EmissionHueShift; +float4 _EmissiveScroll_Direction; +float _EmissiveScroll_Width; +float _EmissiveScroll_Velocity; +float _EmissiveScroll_Interval; +float _EmissionBlinkingEnabled; +float _EmissiveBlink_Min; +float _EmissiveBlink_Max; +float _EmissiveBlink_Velocity; +float _ScrollingEmission; +float _EnableGITDEmission; +float _GITDEMinEmissionMultiplier; +float _GITDEMaxEmissionMultiplier; +float _GITDEMinLight; +float _GITDEMaxLight; +float _GITDEWorldOrMesh; +float _EmissionCenterOutEnabled; +float _EmissionCenterOutSpeed; +float _EmissionHueShiftEnabled; +float _EmissionBlinkingOffset; +float _EmissionScrollingOffset; +float _EmissionHueShiftSpeed; +float _EmissionHueShiftSpeed1; + +float4 _EmissionColor1; +#ifdef EFFECT_HUE_VARIATION + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_EmissionMap1); + #endif + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_EmissionMask1); + #endif + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_EmissionScrollingCurve1); float4 _EmissionScrollingCurve1_ST; + #endif +#endif +float _EmissionBaseColorAsMap1; +float _EmissionStrength1; +float _EnableEmission1; +float _EmissionHueShift1; +float4 _EmissiveScroll_Direction1; +float _EmissiveScroll_Width1; +float _EmissiveScroll_Velocity1; +float _EmissiveScroll_Interval1; +float _EmissionBlinkingEnabled1; +float _EmissiveBlink_Min1; +float _EmissiveBlink_Max1; +float _EmissiveBlink_Velocity1; +float _ScrollingEmission1; +float _EnableGITDEmission1; +float _GITDEMinEmissionMultiplier1; +float _GITDEMaxEmissionMultiplier1; +float _GITDEMinLight1; +float _GITDEMaxLight1; +float _GITDEWorldOrMesh1; +float _EmissionCenterOutEnabled1; +float _EmissionCenterOutSpeed1; +float _EmissionHueShiftEnabled1; +float _EmissionBlinkingOffset1; +float _EmissionScrollingOffset1; + +float _EmissionReplace; + +float _EmissionScrollingVertexColor; +float _EmissionScrollingVertexColor1; + +float _EmissionScrollingUseCurve; +float _EmissionScrollingUseCurve1; + +#ifdef POI_AUDIOLINK + half _EnableEmissionStrengthAudioLink; + half _AudioLinkEmissionStrengthBand; + half _EnableEmissionCenterOutAudioLink; + half _AudioLinkEmissionCenterOutBand; + float2 _AudioLinkAddEmission; + half _AudioLinkAddEmissionBand; + float2 _EmissionCenterOutAddAudioLink; + half _AudioLinkEmissionCenterOutAddBand; + + half _EnableEmission1StrengthAudioLink; + half _AudioLinkEmission1StrengthBand; + half _EnableEmission1CenterOutAudioLink; + half _AudioLinkEmission1CenterOutBand; + float2 _AudioLinkAddEmission1; + half _AudioLinkAddEmission1Band; + float2 _EmissionCenterOutAddAudioLink1; + half _AudioLinkEmission1CenterOutAddBand; + + fixed _EmissionCenterOutAudioLinkWidth; + fixed _EmissionCenterOutAddAudioLinkwidth; + fixed _Emission1CenterOutAudioLinkWidth; + fixed _Emission1CenterOutAddAudioLinkwidth; +#endif + +float calculateGlowInTheDark(in float minLight, in float maxLight, in float minEmissionMultiplier, in float maxEmissionMultiplier, in float enabled) +{ + float glowInTheDarkMultiplier = 1; + + if (enabled) + { + #ifdef POI_LIGHTING + float3 lightValue = float(0) ? poiLight.finalLighting.rgb: poiLight.directLighting.rgb; + float gitdeAlpha = (clamp(poiMax(lightValue), minLight, maxLight) - minLight) / (maxLight - minLight); + glowInTheDarkMultiplier = lerp(minEmissionMultiplier, maxEmissionMultiplier, gitdeAlpha); + #endif + } + return glowInTheDarkMultiplier; +} + +float calculateScrollingEmission(in float3 direction, in float velocity, in float interval, in float scrollWidth, float offset, float3 position) +{ + float phase = 0; + phase = dot(position, direction); + phase -= (_Time.y + offset) * velocity; + phase /= interval; + phase -= floor(phase); + phase = saturate(phase); + return(pow(phase, scrollWidth) + pow(1 - phase, scrollWidth * 4)) * 0.5; +} + +float calculateBlinkingEmission(in float blinkMin, in float blinkMax, in float blinkVelocity, float offset) +{ + float amplitude = (blinkMax - blinkMin) * 0.5f; + float base = blinkMin + amplitude; + return sin((_Time.y + offset) * blinkVelocity) * amplitude + base; +} + +float3 calculateEmissionNew(in float3 baseColor, inout float4 finalColor) +{ + // First Emission + float3 emission0 = 0; + float emissionStrength0 = float(0); + float3 emissionColor0 = 0; + + #ifdef POI_AUDIOLINK + + if (poiMods.audioLinkTextureExists) + { + + if (float(0)) + { + emissionStrength0 *= poiMods.audioLink[float(0)]; + } + + if (float(0)) + { + emissionStrength0 *= getBandAtTime(float(0), saturate(1 - poiLight.nDotV), float(1)); + } + emissionStrength0 += lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, getBandAtTime(float(0), saturate(1 - poiLight.nDotV), float(1))); + emissionStrength0 += lerp(float4(0,0,-10,10).x, float4(0,0,-10,10).y, poiMods.audioLink[float(0)]); + emissionStrength0 = max(emissionStrength0, 0); + } + #endif + + float glowInTheDarkMultiplier0 = calculateGlowInTheDark(float(0), float(1), float(1), float(0), float(0)); + + #if defined(PROP_EMISSIONMAP) || !defined(OPTIMIZER_ENABLED) + + if (!float(0)) + { + emissionColor0 = POI2D_SAMPLER_PAN(_EmissionMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).rgb * lerp(1, baseColor, float(0)).rgb * float4(0,0,0,0).rgb; + } + else + { + emissionColor0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap, _MainTex, ((.5 + poiLight.nDotV * .5) * float4(1,1,0,0).xy) + _Time.x * float(5)).rgb * lerp(1, baseColor, float(0)).rgb * float4(0,0,0,0).rgb; + } + #else + emissionColor0 = lerp(1, baseColor, float(0)).rgb * float4(0,0,0,0).rgb; + #endif + + + if (float(0)) + { + float3 pos = poiMesh.localPos; + + if (float(0)) + { + pos = poiMesh.vertexColor.rgb; + } + + + if (float(0)) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE) || !defined(OPTIMIZER_ENABLED) + emissionStrength0 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve, _MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _EmissionScrollingCurve) + (dot(pos, float4(0,-10,0,0).xyz) * float(20)) + _Time.x * float(10)).r; + #endif + } + else + { + emissionStrength0 *= calculateScrollingEmission(float4(0,-10,0,0).xyz, float(10), float(20), float(10), float(0), pos); + } + } + + + if (float(0)) + { + emissionStrength0 *= calculateBlinkingEmission(float(0), float(1), float(4), float(0)); + } + + emissionColor0 = hueShift(emissionColor0, frac(float(0) + float(0) * _Time.x) * float(0)); + + #if defined(PROP_EMISSIONMASK) || !defined(OPTIMIZER_ENABLED) + float emissionMask0 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask, _MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _EmissionMask) + _Time.x * float4(0,0,0,0)).r; + #else + float emissionMask0 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (float(4) != 4) + { + emissionMask0 *= blackLightMask[float(4)]; + } + #endif + + emissionStrength0 *= glowInTheDarkMultiplier0 * emissionMask0; + emission0 = emissionStrength0 * emissionColor0; + + #ifdef POI_DISSOLVE + + if (float(2) != 2) + { + emission0 *= lerp(1 - dissolveAlpha, dissolveAlpha, float(2)); + } + #endif + + // Second Emission + float3 emission1 = 0; + float emissionStrength1 = 0; + float3 emissionColor1 = 0; + + #ifdef EFFECT_HUE_VARIATION + emissionStrength1 = float(0); + + #ifdef POI_AUDIOLINK + + if (poiMods.audioLinkTextureExists) + { + + if (float(0)) + { + emissionStrength1 *= poiMods.audioLink[float(0)]; + } + + if (float(0)) + { + emissionStrength1 *= getBandAtTime(float(0), saturate(1 - poiLight.nDotV), float(1)); + } + emissionStrength1 += lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, getBandAtTime(float(0), saturate(1 - poiLight.nDotV), float(1))); + emissionStrength1 += lerp(float4(0,0,-10,10).x, float4(0,0,-10,10).y, poiMods.audioLink[float(0)]); + emissionStrength1 = max(emissionStrength1, 0); + } + #endif + + float glowInTheDarkMultiplier1 = calculateGlowInTheDark(float(0), float(1), float(1), float(0), float(0)); + #if defined(PROP_EMISSIONMAP1) || !defined(OPTIMIZER_ENABLED) + + + if (!float(0)) + { + emissionColor1 = POI2D_SAMPLER_PAN(_EmissionMap1, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)) * lerp(1, baseColor, float(0)).rgb * float4(1,1,1,1).rgb; + } + else + { + emissionColor1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMap1, _MainTex, ((.5 + poiLight.nDotV * .5) * float4(1,1,0,0).xy) + _Time.x * float(5)).rgb * lerp(1, baseColor, float(0)).rgb * float4(1,1,1,1).rgb; + } + #else + emissionColor1 = lerp(1, baseColor, float(0)).rgb * float4(1,1,1,1).rgb;; + #endif + + if (float(0)) + { + float3 pos1 = poiMesh.localPos; + + if (float(0)) + { + pos1 = poiMesh.vertexColor.rgb; + } + + + if (float(0)) + { + #if defined(PROP_EMISSIONSCROLLINGCURVE1) || !defined(OPTIMIZER_ENABLED) + emissionStrength1 *= UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionScrollingCurve1, _MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _EmissionScrollingCurve1) + (dot(pos1, float4(0,-10,0,0)) * float(20)) + _Time.x * float(10)); + #endif + } + else + { + emissionStrength1 *= calculateScrollingEmission(float4(0,-10,0,0), float(10), float(20), float(10), float(0), pos1); + } + } + + if (float(0)) + { + emissionStrength1 *= calculateBlinkingEmission(float(0), float(1), float(4), float(0)); + } + + emissionColor1 = hueShift(emissionColor1, frac(float(0) + float(0) * _Time.x) * float(0)); + #if defined(PROP_EMISSIONMASK1) || !defined(OPTIMIZER_ENABLED) + float emissionMask1 = UNITY_SAMPLE_TEX2D_SAMPLER(_EmissionMask1, _MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _EmissionMask1) + _Time.x * float4(0,0,0,0)); + #else + float emissionMask1 = 1; + #endif + + #ifdef POI_BLACKLIGHT + if (float(4) != 4) + { + emissionMask1 *= blackLightMask[float(4)]; + } + #endif + emissionStrength1 *= glowInTheDarkMultiplier1 * emissionMask1; + emission1 = emissionStrength1 * emissionColor1; + + #ifdef POI_DISSOLVE + if (float(2) != 2) + { + emission1 *= lerp(1 - dissolveAlpha, dissolveAlpha, float(2)); + } + #endif + #endif + finalColor.rgb = lerp(finalColor.rgb, saturate(emissionColor0 + emissionColor1), saturate(emissionStrength0 + emissionStrength1) * float(0) * poiMax(emission0 + emission1)); + + return emission0 + emission1; +} + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEmission.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEmission.cginc.meta new file mode 100644 index 00000000..8e598d6b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEmission.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 09c898aeef71aaf43a3bf0ebc1ffe34a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEnvironmentalRimLighting.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEnvironmentalRimLighting.cginc new file mode 100644 index 00000000..cb7629d0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEnvironmentalRimLighting.cginc @@ -0,0 +1,48 @@ +#ifndef POI_ENVIRONMENTAL_RIM + #define POI_ENVIRONMENTAL_RIM + + //enviro rim + float _EnableEnvironmentalRim; + float _RimEnviroBlur; + float _RimEnviroMinBrightness; + float _RimEnviroWidth; + float _RimEnviroSharpness; + float _RimEnviroIntensity; + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_RimEnviroMask); + #endif + + float3 calculateEnvironmentalRimLighting(in float4 albedo) + { + float enviroRimAlpha = saturate(1 - smoothstep(min(float(0), float(0.45)), float(0.45), poiCam.viewDotNormal)); + float(0.7) *= 1.7 - 0.7 * float(0.7); + + float3 enviroRimColor = 0; + float interpolator = unity_SpecCube0_BoxMin.w; + + if (interpolator < 0.99999) + { + //Probe 1 + float4 reflectionData0 = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], float(0.7) * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor0 = DecodeHDR(reflectionData0, unity_SpecCube0_HDR); + + //Probe 2 + float4 reflectionData1 = UNITY_SAMPLE_TEXCUBE_SAMPLER_LOD(unity_SpecCube1, unity_SpecCube0, poiMesh.normals[1], float(0.7) * UNITY_SPECCUBE_LOD_STEPS); + float3 reflectionColor1 = DecodeHDR(reflectionData1, unity_SpecCube1_HDR); + + enviroRimColor = lerp(reflectionColor1, reflectionColor0, interpolator); + } + else + { + float4 reflectionData = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiMesh.normals[1], float(0.7) * UNITY_SPECCUBE_LOD_STEPS); + enviroRimColor = DecodeHDR(reflectionData, unity_SpecCube0_HDR); + } + #if defined(PROP_RIMENVIROMASK) || !defined(OPTIMIZER_ENABLED) + half enviroMask = poiMax(POI2D_SAMPLER_PAN(_RimEnviroMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).rgb); + #else + half enviroMask = 1; + #endif + return lerp(0, max(0, (enviroRimColor - float(0)) * albedo.rgb), enviroRimAlpha).rgb * enviroMask * float(1); + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEnvironmentalRimLighting.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEnvironmentalRimLighting.cginc.meta new file mode 100644 index 00000000..f2b996bb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiEnvironmentalRimLighting.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 80d37513f46500044be4cab42514db33 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFlipbook.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFlipbook.cginc new file mode 100644 index 00000000..6f48d597 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFlipbook.cginc @@ -0,0 +1,222 @@ +#ifndef POI_FLIPBOOK +#define POI_FLIPBOOK + +#if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2DARRAY(_FlipbookTexArray); float4 _FlipbookTexArray_ST; +#endif +#if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_FlipbookMask); +#endif + +float4 _FlipbookColor; +float _FlipbookFPS; +float _FlipbookTotalFrames; +float4 _FlipbookScaleOffset; +float _FlipbookTiled; +float _FlipbookCurrentFrame; +float _FlipbookEmissionStrength; +float _FlipbookRotation; +float _EnableFlipbook; +float _FlipbookTexArrayUV; +float _FlipbookAlphaControlsFinalAlpha; +float _FlipbookRotationSpeed; +float _FlipbookIntensityControlsAlpha; +float _FlipbookColorReplaces; +float2 _FlipbookTexArrayPan; + +// blending +float _FlipbookReplace; +float _FlipbookMultiply; +float _FlipbookAdd; + +// anim +float _FlipbookMovementType; +float4 _FlipbookStartEndOffset; +float _FlipbookMovementSpeed; + +// Crossfade +float _FlipbookCrossfadeEnabled; +float2 _FlipbookCrossfadeRange; + +float _FlipbookHueShiftEnabled; +float _FlipbookHueShiftSpeed; +float _FlipbookHueShift; +// Global +float4 flipBookPixel; +float4 flipBookPixelMultiply; +float flipBookMask; + +// Audio Link +half _AudioLinkFlipbookScaleBand; +half4 _AudioLinkFlipbookScale; +half _AudioLinkFlipbookAlphaBand; +half2 _AudioLinkFlipbookAlpha; +half _AudioLinkFlipbookEmissionBand; +half2 _AudioLinkFlipbookEmission; +half _AudioLinkFlipbookFrameBand; +half2 _AudioLinkFlipbookFrame; + +#ifndef POI_SHADOW + + void applyFlipbook(inout float4 finalColor, inout float3 flipbookEmission) + { + + #if defined(PROP_FLIPBOOKMASK) || !defined(OPTIMIZER_ENABLED) + flipBookMask = POI2D_SAMPLER_PAN(_FlipbookMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + flipBookMask = 1; + #endif + float4 flipbookScaleOffset = float4(1,1,0,0); + + #ifdef POI_AUDIOLINK + flipbookScaleOffset.xy += lerp(float4(0,0,0,0).xy, float4(0,0,0,0).zw, poiMods.audioLink[float(0)]); + #endif + + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float2 uv = frac(poiMesh.uv[float(0)]); + float theta = radians(float(0) + _Time.z * float(0)); + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + // 2d rotation + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw, float2(0, 0), float2(1, 1)); + + + if (float(0) == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + flipBookPixel = 0; + return; + } + } + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(float(-1), float(1)); + if (float(-1) < 0) + { + currentFrame = (_Time.y / (1 / float(30))) % float(1); + } + #ifdef POI_AUDIOLINK + currentFrame += lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]); + #endif + flipBookPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * float4(0,0,0,0), floor(currentFrame))); + + if (float(0)) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * float4(0,0,0,0), floor((currentFrame + 1) % float(1)))); + flipBookPixel = lerp(flipBookPixel, flipbookNextPixel, smoothstep(float4(0.75,1,0,1).x, float4(0.75,1,0,1).y, frac(currentFrame))); + } + #else + flipBookPixel = 1; + #endif + + + if (float(0)) + { + flipBookPixel.a = poiMax(flipBookPixel.rgb); + } + + if (float(0)) + { + flipBookPixel.rgb = float4(1,1,1,1).rgb; + } + else + { + flipBookPixel.rgb *= float4(1,1,1,1).rgb; + } + + #ifdef POI_BLACKLIGHT + + if (float(4) != 4) + { + flipBookMask *= blackLightMask[float(4)]; + } + #endif + + + if (float(0)) + { + flipBookPixel.rgb = hueShift(flipBookPixel.rgb, float(0) + _Time.x * float(0)); + } + half flipbookAlpha = 1; + #ifdef POI_AUDIOLINK + flipbookAlpha = saturate(lerp(float4(1,1,0,0).x, float4(1,1,0,0).y, poiMods.audioLink[float(0)])); + #endif + + finalColor.rgb = lerp(finalColor.rgb, flipBookPixel.rgb, flipBookPixel.a * float4(1,1,1,1).a * float(1) * flipBookMask * flipbookAlpha); + finalColor.rgb = finalColor + flipBookPixel.rgb * float(0) * flipBookMask * flipbookAlpha; + finalColor.rgb = finalColor * lerp(1, flipBookPixel.rgb, flipBookPixel.a * float4(1,1,1,1).a * flipBookMask * float(0) * flipbookAlpha); + + + if (float(0)) + { + finalColor.a = lerp(finalColor.a, flipBookPixel.a * float4(1,1,1,1).a, flipBookMask); + } + float flipbookEmissionStrength = float(0); + #ifdef POI_AUDIOLINK + flipbookEmissionStrength += max(lerp(float4(0,0,0,0).x, float4(0,0,0,0).y, poiMods.audioLink[float(0)]), 0); + #endif + flipbookEmission = lerp(0, flipBookPixel.rgb * flipbookEmissionStrength, flipBookPixel.a * float4(1,1,1,1).a * flipBookMask * flipbookAlpha); + } + +#else + + float applyFlipbookAlphaToShadow(float2 uv) + { + + if (float(0)) + { + float flipbookShadowAlpha = 0; + + float4 flipbookScaleOffset = float4(1,1,0,0); + flipbookScaleOffset.xy = 1 - flipbookScaleOffset.xy; + float theta = radians(float(0)); + + float cs = cos(theta); + float sn = sin(theta); + float2 spriteCenter = flipbookScaleOffset.zw + .5; + uv = float2((uv.x - spriteCenter.x) * cs - (uv.y - spriteCenter.y) * sn + spriteCenter.x, (uv.x - spriteCenter.x) * sn + (uv.y - spriteCenter.y) * cs + spriteCenter.y); + + float2 newUV = remap(uv, float2(0, 0) + flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw, float2(1, 1) - flipbookScaleOffset.xy / 2 + flipbookScaleOffset.zw, float2(0, 0), float2(1, 1)); + + #if defined(PROP_FLIPBOOKTEXARRAY) || !defined(OPTIMIZER_ENABLED) + float currentFrame = fmod(float(-1), float(1)); + if (float(-1) < 0) + { + currentFrame = (_Time.y / (1 / float(30))) % float(1); + } + + half4 flipbookColor = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * float4(0,0,0,0), floor(currentFrame))); + + if (float(0)) + { + float4 flipbookNextPixel = UNITY_SAMPLE_TEX2DARRAY(_FlipbookTexArray, float3(TRANSFORM_TEX(newUV, _FlipbookTexArray) + _Time.x * float4(0,0,0,0), floor((currentFrame + 1) % float(1)))); + flipbookColor = lerp(flipbookColor, flipbookNextPixel, smoothstep(float4(0.75,1,0,1).x, float4(0.75,1,0,1).y, frac(currentFrame))); + } + #else + half4 flipbookColor = 1; + #endif + + if (float(0)) + { + flipbookColor.a = poiMax(flipbookColor.rgb); + } + + + if (float(0) == 0) + { + if (max(newUV.x, newUV.y) > 1 || min(newUV.x, newUV.y) < 0) + { + flipbookColor.a = 0; + } + } + return flipbookColor.a * float4(1,1,1,1).a; + } + return 1; + } + +#endif +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFlipbook.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFlipbook.cginc.meta new file mode 100644 index 00000000..9b89a1f7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFlipbook.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 04364b63d0aa05f41a6c90828568dcfc +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFrag.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFrag.cginc new file mode 100644 index 00000000..5d46254f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFrag.cginc @@ -0,0 +1,401 @@ +#ifndef POIFRAG +#define POIFRAG + +float _MainEmissionStrength; +float _IgnoreFog; +half _GIEmissionMultiplier; +float _IridescenceTime; +float _AlphaToMask; +float _ForceOpaque; +float _commentIfZero_EnableGrabpass; +float _AlphaPremultiply; +float2 _MainTexPan; +float _MainTextureUV; +float _commentIfZero_LightingAdditiveEnable; + +float4 frag(v2f i, uint facing: SV_IsFrontFace): SV_Target +{ + #ifdef FORWARD_ADD_PASS + #if !defined(POI_LIGHTING) + return 0; + #endif + #if defined(_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A) && defined(DIRECTIONAL) + return 0; + #endif + #endif + #ifdef FORWARD_ADD_PASS + + if (float(1) == 0) + { + return 0; + } + #endif + UNITY_SETUP_INSTANCE_ID(i); + // Color + float4 albedo = 1; + float4 finalColor = 1; + + // Lighting + float bakedCubemap = 0; // Whether or not metallic should run before or after lighting multiplication + float3 finalSpecular0 = 0; + float3 finalSpecular1 = 0; + float3 finalSSS = 0; + fixed lightingAlpha = 1; + float3 finalEnvironmentalRim = 0; + + // Emissions + float3 finalEmission = 0; + float3 finalLighting = 1; + float3 emissionLighting = 1; + float3 IridescenceEmission = 0; + float3 spawnInEmission = 0; + float3 voronoiEmission = 0; + float3 matcapEmission = 0; + float3 depthTouchEmission = 0; + float3 decalEmission = 0; + float3 glitterEmission = 0; + float3 panosphereEmission = 0; + float3 backFaceEmission = 0; + float3 dissolveEmission = 0; + float3 rimLightEmission = 0; + float3 flipbookEmission = 0; + float3 textOverlayEmission = 0; + float3 videoEmission = 0; + /********************************************************************** + Initialize the base data that's needed everywhere else in the shader + **********************************************************************/ + calculateAttenuation(i); + InitializeMeshData(i, facing); + initPoiMods(); + initializeCamera(i); + calculateTangentData(); + + + #ifdef POI_BLACKLIGHT + createBlackLightMask(); + + if (float(0)) + { + return float4(blackLightMask.rgb, 1); + } + #endif + + // This has to happen in the initializbecause it alters UV data globally + #ifdef POI_PARALLAX + calculateandApplyParallax(); + #endif + + // Basically every texture relies on the maintex sampler to function and that's why this is here. + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _MainTex) + _Time.x * float4(0,0,0,0)); + half3 detailMask = 1; + calculateNormals(detailMask); + calculateVertexLightingData(i); + /********************************************************************** + Calculate Light Maps + **********************************************************************/ + #ifdef POI_DATA + calculateLightingData(i); + #endif + #ifdef POI_LIGHTING + calculateBasePassLightMaps(); + #endif + + /********************************************************************** + Calculate Color Data + **********************************************************************/ + + initTextureData(albedo, mainTexture, backFaceEmission, dissolveEmission, detailMask); + + #ifdef POI_DECAL + applyDecals(albedo, decalEmission); + #endif + + + #ifdef POI_IRIDESCENCE + + if (float(0) == 0) + { + applyIridescence(albedo, IridescenceEmission); + } + #endif + + #ifdef POI_VORONOI + applyVoronoi(albedo, voronoiEmission); + #endif + + #ifdef POI_MSDF + ApplyTextOverlayColor(albedo, textOverlayEmission); + #endif + + #ifdef POI_ENVIRONMENTAL_RIM + finalEnvironmentalRim = calculateEnvironmentalRimLighting(albedo); + #endif + + #if defined(POI_METAL) || defined(POI_CLEARCOAT) + CalculateReflectionData(); + #endif + + #ifdef POI_DATA + distanceFade(albedo); + #endif + + #ifdef POI_RANDOM + albedo.a *= i.angleAlpha; + #endif + + #ifdef MATCAP + applyMatcap(albedo, matcapEmission); + #endif + + #ifdef PANOSPHERE + applyPanosphereColor(albedo, panosphereEmission); + #endif + + #ifdef POI_FLIPBOOK + applyFlipbook(albedo, flipbookEmission); + #endif + + #ifdef POI_GLITTER + applyGlitter(albedo, glitterEmission); + #endif + + #ifdef POI_RIM + applyRimLighting(albedo, rimLightEmission); + #endif + + #ifdef POI_DEPTH_COLOR + applyDepthColor(albedo, depthTouchEmission, finalEmission, i.worldDirection); + #endif + + #ifdef POI_IRIDESCENCE + + if (float(0) == 1) + { + applyIridescence(albedo, IridescenceEmission); + } + #endif + + #ifdef POI_VIDEO + applyScreenEffect(albedo, videoEmission); + #endif + + applySpawnIn(albedo, spawnInEmission, poiMesh.uv[0], poiMesh.localPos); + + /********************************************************************** + Handle a few alpha options + **********************************************************************/ + + if (float(0) == 1) + { + + if (float(0) == 0) + { + applyDithering(albedo); + } + } + + albedo.a = max(float(0), albedo.a); + + + if (float(0) == 0) + { + albedo.a = 1; + } + + + if (float(0) >= 1) + { + clip(albedo.a - float(0.5)); + } + + + if (float(0)) + { + albedo.rgb *= saturate(albedo.a + 0.0000000001); + } + + /********************************************************************** + Lighting Time :) + **********************************************************************/ + + #ifdef POI_LIGHTING + finalLighting = calculateFinalLighting(albedo.rgb, finalColor); + + #ifdef SUBSURFACE + finalSSS = calculateSubsurfaceScattering(); + //finalSSS = calculateSubsurfaceScattering(albedo); + #endif + #endif + + float4 finalColorBeforeLighting = albedo; + finalColor = finalColorBeforeLighting; + + #ifdef POI_SPECULAR + finalSpecular0 = calculateSpecular(finalColorBeforeLighting); + #endif + #ifdef POI_PARALLAX + calculateAndApplyInternalParallax(finalColor); + #endif + + #ifdef POI_ALPHA_TO_COVERAGE + ApplyAlphaToCoverage(finalColor); + #endif + + + if (float(0) == 1) + { + + if (float(0) == 1) + { + applyDithering(finalColor); + } + } + + + #ifdef POI_METAL + calculateMetallicness(); + bool probeExists = shouldMetalHappenBeforeLighting(); + + if (!probeExists) + { + ApplyMetallicsFake(finalColor, albedo); + } + #endif + + + #ifdef POI_LIGHTING + emissionLighting = finalLighting; + #if defined(FORWARD_ADD_PASS) && defined(POI_METAL) + finalLighting *= 1 - metalicMap; + #endif + applyLighting(finalColor, finalLighting); + #endif + + #ifdef POI_BRDF + poiBRDF(finalColor, finalColorBeforeLighting); + #endif + + #ifdef POI_METAL + + if (probeExists) + { + ApplyMetallics(finalColor, albedo); + } + #endif + + finalColor.rgb += finalSpecular0 + finalEnvironmentalRim + finalSSS; + + #ifdef FORWARD_BASE_PASS + #ifdef POI_CLEARCOAT + calculateAndApplyClearCoat(finalColor); + #endif + #endif + + finalColor.a = saturate(finalColor.a); + + /********************************************************************** + Add Up all the emission values :D + **********************************************************************/ + //#if defined(FORWARD_BASE_PASS) || defined(POI_META_PASS) + finalEmission += finalColorBeforeLighting.rgb * float(0) * albedo.a; + finalEmission += wireframeEmission; + finalEmission += IridescenceEmission; + finalEmission += spawnInEmission; + finalEmission += voronoiEmission; + finalEmission += matcapEmission; + finalEmission += depthTouchEmission; + finalEmission += decalEmission; + finalEmission += glitterEmission; + finalEmission += panosphereEmission; + finalEmission += backFaceEmission; + finalEmission += rimLightEmission; + finalEmission += flipbookEmission; + finalEmission += videoEmission; + finalEmission += textOverlayEmission; + finalEmission += dissolveEmission; + #ifdef POI_EMISSION + finalEmission += calculateEmissionNew(finalColorBeforeLighting.rgb, finalColor); + #endif + //#endif + // Compensate for HDR lights + #if defined(FORWARD_ADD_PASS) + finalEmission *= emissionLighting; // TODO: add in vertex lights + #else + finalEmission *= max(1, emissionLighting); + #endif + + /********************************************************************** + Meta Pass Hype :D + **********************************************************************/ + #ifdef POI_META_PASS + UnityMetaInput meta; + UNITY_INITIALIZE_OUTPUT(UnityMetaInput, meta); + meta.Emission = finalEmission * float(1); + meta.Albedo = saturate(finalColor.rgb); + #ifdef POI_SPECULAR + meta.SpecularColor = poiLight.color.rgb * float4(1,1,1,1).rgb * lerp(1, albedo.rgb, float(0)) * float4(1,1,1,1).a; + #else + meta.SpecularColor = poiLight.color.rgb * albedo.rgb; + #endif + return UnityMetaFragment(meta); + #endif + + /********************************************************************** + Apply Emission to finalColor + **********************************************************************/ + finalColor.rgb += finalEmission; + + /********************************************************************** + Grabpass features + **********************************************************************/ + + + if (float(0)) + { + applyGrabEffects(finalColor); + } + + /********************************************************************** + Unity Fog + **********************************************************************/ + #ifdef FORWARD_BASE_PASS + + if (float(0) == 0) + { + UNITY_APPLY_FOG(i.fogCoord, finalColor); + } + #endif + + #ifdef FORWARD_ADD_PASS + if (float(0) > 0) + { + finalColor.rgb *= finalColor.a; + } + #endif + + + if (float(0) == 0) + { + finalColor.a = 1; + } + + #ifdef FORWARD_ADD_PASS + //finalColor.rgb = smoothstep(float(0), float(0.5), 1 - (.5 * poiLight.nDotL + .5)); + #endif + + #ifdef POI_DEBUG + displayDebugInfo(finalColor); + #endif + + #ifdef POI_AUDIOLINK + + if (float(0)) + { + finalColor = poiMods.audioLinkTexture; + } + #endif + + //finalColor.rgb = frac(finalColor.rgb); + return finalColor; +} +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFrag.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFrag.cginc.meta new file mode 100644 index 00000000..f91e526f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9ec92765f38779b4b98612dcd7e29833 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGlitter.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGlitter.cginc new file mode 100644 index 00000000..eebce5bb --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGlitter.cginc @@ -0,0 +1,274 @@ +#ifndef POI_GLITTER + #define POI_GLITTER + + half3 _GlitterColor; + float2 _GlitterPan; + half _GlitterSpeed; + half _GlitterBrightness; + float _GlitterFrequency; + float _GlitterJitter; + half _GlitterSize; + half _GlitterContrast; + half _GlitterAngleRange; + half _GlitterMinBrightness; + half _GlitterBias; + float _GlitterRandomColors; + float2 _GlitterMinMaxSaturation; + float2 _GlitterMinMaxBrightness; + fixed _GlitterUseSurfaceColor; + float _GlitterBlendType; + float _GlitterMode; + float _GlitterShape; + float _GlitterCenterSize; + float _glitterFrequencyLinearEmissive; + float _GlitterJaggyFix; + float _GlitterRandomRotation; + float _GlitterTextureRotation; + float4 _GlitterMinMaxSize; + float _GlitterRandomSize; + float2 _GlitterUVPanning; + + float _GlitterHueShiftEnabled; + float _GlitterHueShiftSpeed; + float _GlitterHueShift; + float _GlitterHideInShadow; + + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_GlitterMask); + #endif + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_GlitterColorMap); + #endif + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_GlitterTexture); + #endif + + float3 randomFloat3(float2 Seed, float maximum) + { + return(.5 + float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed), float2(12.9898, 78.233))) * 43758.5453) + ) * .5) * (maximum); + } + + float3 randomFloat3Range(float2 Seed, float Range) + { + return(float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1) * Range; + } + + float3 randomFloat3WiggleRange(float2 Seed, float Range) + { + float3 rando = (float3( + frac(sin(dot(Seed.xy, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(Seed.yx, float2(12.9898, 78.233))) * 43758.5453), + frac(sin(dot(float2(Seed.x * Seed.y, Seed.y + Seed.x), float2(12.9898, 78.233))) * 43758.5453) + ) * 2 - 1); + float speed = 1 + float(10); + return float3(sin((_Time.x + rando.x * pi) * speed), sin((_Time.x + rando.y * pi) * speed), sin((_Time.x + rando.z * pi) * speed)) * Range; + } + + void Unity_RandomRange_float(float2 Seed, float Min, float Max, out float Out) + { + float randomno = frac(sin(dot(Seed, float2(12.9898, 78.233))) * 43758.5453); + Out = lerp(Min, Max, randomno); + } + + float3 RandomColorFromPoint(float2 rando) + { + fixed hue = random2(rando.x + rando.y).x; + fixed saturation = lerp(float4(0.8,1,0,1).x, float4(0.8,1,0,1).y, rando.x); + fixed value = lerp(float4(0.8,1,0,1).x, float4(0.8,1,0,1).y, rando.y); + float3 hsv = float3(hue, saturation, value); + return HSVtoRGB(hsv); + } + + void applyGlitter(inout float4 albedo, inout float3 glitterEmission) + { + + + // Scale + float2 st = frac(poiMesh.uv[0] + float4(0,0,0,0).xy * _Time.x) * float(300); + + // Tile the space + float2 i_st = floor(st); + float2 f_st = frac(st); + + float m_dist = 10.; // minimun distance + float2 m_point = 0; // minimum point + float2 randoPoint = 0; + float2 dank; + for (int j = -1; j <= 1; j ++) + { + for (int i = -1; i <= 1; i ++) + { + float2 neighbor = float2(i, j); + float2 pos = random2(i_st + neighbor); + float2 rando = pos; + pos = 0.5 + 0.5 * sin(float(1) * 6.2831 * pos); + float2 diff = neighbor + pos - f_st; + float dist = length(diff); + + if (dist < m_dist) + { + dank = diff; + m_dist = dist; + m_point = pos; + randoPoint = rando; + } + } + } + + float randomFromPoint = random(randoPoint); + + float size = float(0.3); + + if(float(0)) + { + size = remapClamped(randomFromPoint, 0, 1, float4(0.1,0.5,0,1).x, float4(0.1,0.5,0,1).y); + } + + + // Assign a color using the closest point position + //color += dot(m_point, float2(.3, .6)); + + // Add distance field to closest point center + // color.g = m_dist; + + // Show isolines + //color -= abs(sin(40.0 * m_dist)) * 0.07; + + // Draw cell center + half glitterAlpha = 1; + switch(float(0)) + { + case 0: //circle + glitterAlpha = (1. - step(size, m_dist)); + break; + case 1: //sqaure + float jaggyFix = pow(poiCam.distanceToVert, 2) * float(0); + + + if (float(0) == 1 || float(0) != 0) + { + float2 center = float2(0, 0); + float randomBoy = 0; + + if(float(0)) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * float(0)) * 360); + float cs = cos(theta); + float sn = sin(theta); + dank = float2((dank.x - center.x) * cs - (dank.y - center.y) * sn + center.x, (dank.x - center.x) * sn + (dank.y - center.y) * cs + center.y); + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + else + { + glitterAlpha = (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.x))) * (1. - smoothstep(size - .1 * jaggyFix, size, abs(dank.y))); + } + break; + } + + float3 finalGlitter = 0; + + switch(float(0)) + { + case 0: + float3 randomRotation = 0; + + if(float(10) > 0) + { + randomRotation = randomFloat3WiggleRange(randoPoint, float(90)); + } + else + { + randomRotation = randomFloat3Range(randoPoint, float(90)); + } + float3 norm = poiMesh.normals[0]; + + float3 glitterReflectionDirection = normalize(mul(poiRotationMatrixFromAngles(randomRotation), norm)); + finalGlitter = lerp(0, float(0) * glitterAlpha, glitterAlpha) + max(pow(saturate(dot(lerp(glitterReflectionDirection, poiCam.viewDir, float(0.8)), poiCam.viewDir)), float(300)), 0); + finalGlitter *= glitterAlpha; + break; + case 1: + float offset = random(randoPoint); + float brightness = sin((_Time.x + offset) * float(10)) * float(20) - (float(20) - 1); + finalGlitter = max(float(0) * glitterAlpha, brightness * glitterAlpha * smoothstep(0, 1, 1 - m_dist * float(0.08) * 10)); + break; + } + + + half3 glitterColor = float4(1,1,1,1); + glitterColor *= lerp(1, albedo, float(0)); + #if defined(PROP_GLITTERCOLORMAP) || !defined(OPTIMIZER_ENABLED) + glitterColor *= POI2D_SAMPLER_PAN(_GlitterColorMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).rgb; + #endif + float2 uv = remapClamped(dank, -size, size, 0, 1); + + if(float(0) == 1 || float(0) != 0 && !float(0)) + { + float2 fakeUVCenter = float2(.5, .5); + float randomBoy = 0; + + if(float(0)) + { + randomBoy = random(randoPoint); + } + float theta = radians((randomBoy + _Time.x * float(0)) * 360); + float cs = cos(theta); + float sn = sin(theta); + uv = float2((uv.x - fakeUVCenter.x) * cs - (uv.y - fakeUVCenter.y) * sn + fakeUVCenter.x, (uv.x - fakeUVCenter.x) * sn + (uv.y - fakeUVCenter.y) * cs + fakeUVCenter.y); + } + + #if defined(PROP_GLITTERTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 glitterTexture = POI2D_SAMPLER_PAN(_GlitterTexture, _MainTex, uv, float4(0,0,0,0)); + #else + float4 glitterTexture = 1; + #endif + //float4 glitterTexture = _GlitterTexture.SampleGrad(sampler_MainTex, frac(uv), ddx(uv), ddy(uv)); + glitterColor *= glitterTexture.rgb; + #if defined(PROP_GLITTERMASK) || !defined(OPTIMIZER_ENABLED) + float glitterMask = POI2D_SAMPLER_PAN(_GlitterMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float glitterMask = 1; + #endif + + glitterMask *= lerp(1, poiLight.rampedLightMap, float(0)); + + #ifdef POI_BLACKLIGHT + if (float(4) != 4) + { + glitterMask *= blackLightMask[float(4)]; + } + #endif + + if(float(0)) + { + glitterColor *= RandomColorFromPoint(random2(randoPoint.x + randoPoint.y)); + } + + + if(float(0)) + { + glitterColor.rgb = hueShift(glitterColor.rgb, float(0) + _Time.x * float(0)); + } + + + if(float(0) == 1) + { + albedo.rgb = lerp(albedo.rgb, finalGlitter * glitterColor * float(3), finalGlitter * glitterTexture.a * glitterMask); + glitterEmission = finalGlitter * glitterColor * max(0, (float(3) - 1) * glitterTexture.a) * glitterMask; + } + else + { + glitterEmission = finalGlitter * glitterColor * float(3) * glitterTexture.a * glitterMask; + } + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGlitter.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGlitter.cginc.meta new file mode 100644 index 00000000..ec41d890 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGlitter.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1aa671d2d34050f43a5a312d59662ea7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGrab.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGrab.cginc new file mode 100644 index 00000000..87ffca25 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGrab.cginc @@ -0,0 +1,125 @@ +#ifndef POI_GRAB + #define POI_GRAB + + float _RefractionIndex; + float _RefractionOpacity; + float _RefractionChromaticAberattion; + float _RefractionEnabled; + float _GrabSrcBlend; + float _GrabDstBlend; + float _GrabPassUseAlpha; + float _GrabPassBlendFactor; + float _GrabBlurDistance; + float _GrabBlurQuality; + float _GrabBlurDirections; + POI_TEXTURE_NOSAMPLER(_GrabPassBlendMap); + + float4 blur(float2 uv) + { + float two_pi = 6.28318530718; + + float2 radius = float(0) / _ScreenParams.xy * 100; // Arbitrary constant to match old blur + float quality = floor(float(2)); + float directions = floor(float(4)); + + // Pixel colour + float4 color = tex2D(_PoiGrab, uv); + + float deltaAngle = two_pi / directions; + float deltaQuality = 1.0 / quality; + for (int i = 0; i < directions; i ++) + { + for (int j = 0; j < quality; j ++) + { + float angle = deltaAngle * i + j; + float offset = deltaQuality * (j + 1); + color += tex2D(_PoiGrab, uv + float2(cos(angle), sin(angle)) * radius * offset); + } + } + + // Output to screen + color /= quality * directions + 1; + return color; + } + + inline float4 Refraction(float indexOfRefraction, float chromaticAberration, float2 projectedGrabPos) + { + float4 refractionColor; + float3 worldViewDir = normalize(UnityWorldSpaceViewDir(poiMesh.worldPos)); + float3 refractionOffset = ((((indexOfRefraction - 1.0) * mul(UNITY_MATRIX_V, float4(poiMesh.normals[1], 0.0)).xyz) * (1.0 / (poiCam.grabPos.z + 1.0))) * (1.0 - dot(poiMesh.normals[1], worldViewDir))); + float2 cameraRefraction = float2(refractionOffset.x, - (refractionOffset.y * _ProjectionParams.x)); + + + if (float(0) > 0) + { + float4 redAlpha = tex2D(_PoiGrab, (projectedGrabPos + cameraRefraction)); + float green = tex2D(_PoiGrab, (projectedGrabPos + (cameraRefraction * (1.0 - chromaticAberration)))).g; + float blue = tex2D(_PoiGrab, (projectedGrabPos + (cameraRefraction * (1.0 + chromaticAberration)))).b; + refractionColor = float4(redAlpha.r, green, blue, redAlpha.a); + } + else + { + float2 refractedGrab = projectedGrabPos + cameraRefraction; + + #ifdef CHROMATIC_ABERRATION_LOW + refractionColor = blur(refractedGrab); + #else + refractionColor = tex2D(_PoiGrab, (refractedGrab)); + #endif + } + return refractionColor; + } + + void calculateRefraction(float2 projectedGrabPos, inout float4 finalColor) + { + float3 refraction = 1; + + if(float(0) == 1) + { + refraction = Refraction(float(1.333333), float(0), projectedGrabPos).rgb; + } + else + { + #ifdef CHROMATIC_ABERRATION_LOW + refraction = blur(projectedGrabPos); + #else + refraction = tex2Dproj(_PoiGrab, poiCam.grabPos).rgb; + #endif + } + + float blendFactor = float(1) * POI2D_SAMPLER_PAN(_GrabPassBlendMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + + if(float(1)) + { + finalColor = poiBlend(float(2), finalColor, float(0), float4(refraction, 1), blendFactor * (1 - finalColor.a)); + finalColor.a = 1; + } + else + { + finalColor = poiBlend(float(2), finalColor, float(0), float4(refraction, 1), blendFactor); + } + } + + float2 calculateGrabPosition() + { + float4 grabPos = poiCam.grabPos; + #if UNITY_UV_STARTS_AT_TOP + float scale = -1.0; + #else + float scale = 1.0; + #endif + float halfPosW = grabPos.w * 0.5; + grabPos.y = (grabPos.y - halfPosW) * _ProjectionParams.x * scale + halfPosW; + #if SHADER_API_D3D9 || SHADER_API_D3D11 + grabPos.w += 0.00000000001; + #endif + return(grabPos / grabPos.w).xy; + } + + void applyGrabEffects(inout float4 finalColor) + { + float2 projectedGrabPos = calculateGrabPosition(); + calculateRefraction(projectedGrabPos, finalColor); + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGrab.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGrab.cginc.meta new file mode 100644 index 00000000..a851a5d4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiGrab.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5d26f67d7f4fa0b45ae5db3cc7a0af62 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHelpers.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHelpers.cginc new file mode 100644 index 00000000..45ad457a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHelpers.cginc @@ -0,0 +1,336 @@ +#ifndef POI_HELPER + #define POI_HELPER + + #ifndef pi + #define pi float(3.14159265359) + #endif + + float linearSin(float x) + { + return pow(min(cos(pi * x / 2.0), 1.0 - abs(x)), 1.0); + } + + float random(float2 p) + { + return frac(sin(dot(p, float2(12.9898, 78.2383))) * 43758.5453123); + } + + float2 random2(float2 p) + { + return frac(sin(float2(dot(p, float2(127.1, 311.7)), dot(p, float2(269.5, 183.3)))) * 43758.5453); + } + + float3 random3(float3 p) + { + return frac(sin(float3(dot(p, float3(127.1, 311.7, 248.6)), dot(p, float3(269.5, 183.3, 423.3)), dot(p, float3(248.3, 315.9, 184.2)))) * 43758.5453); + } + + float3 mod(float3 x, float y) + { + return x - y * floor(x / y); + } + float2 mod(float2 x, float y) + { + return x - y * floor(x / y); + } + + //1/7 + #define K 0.142857142857 + //3/7 + #define Ko 0.428571428571 + + // Permutation polynomial: (34x^2 + x) mod 289 + float3 Permutation(float3 x) + { + return mod((34.0 * x + 1.0) * x, 289.0); + } + + bool IsInMirror() + { + return unity_CameraProjection[2][0] != 0.f || unity_CameraProjection[2][1] != 0.f; + } + + float3 BoxProjection(float3 direction, float3 position, float4 cubemapPosition, float3 boxMin, float3 boxMax) + { + #if UNITY_SPECCUBE_BOX_PROJECTION + + if (cubemapPosition.w > 0) + { + float3 factors = ((direction > 0 ? boxMax: boxMin) - position) / direction; + float scalar = min(min(factors.x, factors.y), factors.z); + direction = direction * scalar + (position - cubemapPosition.xyz); + } + #endif + return direction; + } + + // Camera + float3 getCameraPosition() + { + #ifdef USING_STEREO_MATRICES + return lerp(unity_StereoWorldSpaceCameraPos[0], unity_StereoWorldSpaceCameraPos[1], 0.5); + #endif + return _WorldSpaceCameraPos; + } + + float3 getCameraForward() + { + #if UNITY_SINGLE_PASS_STEREO + float3 p1 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 1, 1)); + float3 p2 = mul(unity_StereoCameraToWorld[0], float4(0, 0, 0, 1)); + #else + float3 p1 = mul(unity_CameraToWorld, float4(0, 0, 1, 1)).xyz; + float3 p2 = mul(unity_CameraToWorld, float4(0, 0, 0, 1)).xyz; + #endif + return normalize(p2 - p1); + } + + float3 grayscale_vector_node() + { + return float3(0, 0.3823529, 0.01845836); + } + + float3 grayscale_for_light() + { + return float3(0.298912, 0.586611, 0.114478); + } + + //Math Operators + + float remap(float x, float minOld, float maxOld, float minNew, float maxNew) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float2 remap(float2 x, float2 minOld, float2 maxOld, float2 minNew, float2 maxNew) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float3 remap(float3 x, float3 minOld, float3 maxOld, float3 minNew, float3 maxNew) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float4 remap(float4 x, float4 minOld, float4 maxOld, float4 minNew, float4 maxNew) + { + return minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld); + } + + float remapClamped(float x, float minOld, float maxOld, float minNew, float maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float2 remapClamped(float2 x, float2 minOld, float2 maxOld, float2 minNew, float2 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float3 remapClamped(float3 x, float3 minOld, float3 maxOld, float3 minNew, float3 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float4 remapClamped(float4 x, float4 minOld, float4 maxOld, float4 minNew, float4 maxNew) + { + return clamp(minNew + (x - minOld) * (maxNew - minNew) / (maxOld - minOld), minNew, maxNew); + } + + float poiMax(float2 i) + { + return max(i.x, i.y); + } + + float poiMax(float3 i) + { + return max(max(i.x, i.y), i.z); + } + + float poiMax(float4 i) + { + return max(max(max(i.x, i.y), i.z), i.w); + } + + float4x4 poiAngleAxisRotationMatrix(float angle, float3 axis) + { + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0); + } + + float4x4 poiRotationMatrixFromAngles(float x, float y, float z) + { + float angleX = radians(x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + + float4x4 poiRotationMatrixFromAngles(float3 angles) + { + float angleX = radians(angles.x); + float c = cos(angleX); + float s = sin(angleX); + float4x4 rotateXMatrix = float4x4(1, 0, 0, 0, + 0, c, -s, 0, + 0, s, c, 0, + 0, 0, 0, 1); + + float angleY = radians(angles.y); + c = cos(angleY); + s = sin(angleY); + float4x4 rotateYMatrix = float4x4(c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1); + + float angleZ = radians(angles.z); + c = cos(angleZ); + s = sin(angleZ); + float4x4 rotateZMatrix = float4x4(c, -s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + return mul(mul(rotateXMatrix, rotateYMatrix), rotateZMatrix); + } + +#endif + +half2 calcScreenUVs(half4 grabPos) +{ + half2 uv = grabPos.xy / (grabPos.w + 0.0000000001); + #if UNITY_SINGLE_PASS_STEREO + uv.xy *= half2(_ScreenParams.x * 2, _ScreenParams.y); + #else + uv.xy *= _ScreenParams.xy; + #endif + + return uv; +} + +float inverseLerp(float A, float B, float T) +{ + return(T - A) / (B - A); +} + +float inverseLerp2(float2 a, float2 b, float2 value) +{ + float2 AB = b - a; + float2 AV = value - a; + return dot(AV, AB) / dot(AB, AB); +} + +float inverseLerp3(float3 a, float3 b, float3 value) +{ + float3 AB = b - a; + float3 AV = value - a; + return dot(AV, AB) / dot(AB, AB); +} + +float inverseLerp4(float4 a, float4 b, float4 value) +{ + float4 AB = b - a; + float4 AV = value - a; + return dot(AV, AB) / dot(AB, AB); +} + +// Dithering +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; +} + +// UV Manipulation +float2 TransformUV(half2 offset, half rotation, half2 scale, float2 uv) +{ + float theta = radians(rotation); + scale = 1 - scale; + float cs = cos(theta); + float sn = sin(theta); + float2 centerPoint = offset + .5; + uv = float2((uv.x - centerPoint.x) * cs - (uv.y - centerPoint.y) * sn + centerPoint.x, (uv.x - centerPoint.x) * sn + (uv.y - centerPoint.y) * cs + centerPoint.y); + + return remap(uv, float2(0, 0) + offset + (scale * .5), float2(1, 1) + offset - (scale * .5), float2(0, 0), float2(1, 1)); +} + +bool isVR() +{ + // USING_STEREO_MATRICES + #if UNITY_SINGLE_PASS_STEREO + return true; + #else + return false; + #endif +} + +bool isVRHandCamera() +{ + return !isVR() && abs(UNITY_MATRIX_V[0].y) > 0.0000005; +} + +bool isDesktop() +{ + return !isVRHandCamera(); +} + +bool isVRHandCameraPreview() +{ + return isVRHandCamera() && _ScreenParams.y == 720; +} + +bool isVRHandCameraPicture() +{ + return isVRHandCamera() && _ScreenParams.y == 1080; +} + +bool isPanorama() +{ + // Crude method + // FOV=90=camproj=[1][1] + return unity_CameraProjection[1][1] == 1 && _ScreenParams.x == 1075 && _ScreenParams.y == 1025; +} + +float calculateluminance(float3 color) +{ + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; +} diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHelpers.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHelpers.cginc.meta new file mode 100644 index 00000000..16550b87 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHelpers.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2c76666faa0e961439f3548843fd4d27 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHologram.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHologram.cginc new file mode 100644 index 00000000..0bd1cab5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHologram.cginc @@ -0,0 +1,43 @@ +#ifndef POI_HOLOGRAM + #define POI_HOLOGRAM + + #if defined(PROP_HOLOALPHAMAP) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_HoloAlphaMap); float4 _HoloAlphaMap_ST; + #endif + float _HoloCoordinateSpace; // 0 World, 1 Local, 2 UV + float3 _HoloDirection; + float _HoloScrollSpeed; + float _HoloLineDensity; + + fixed _HoloFresnelAlpha; + fixed _HoloRimSharpness; + fixed _HoloRimWidth; + void ApplyHoloAlpha(inout float4 color) + { + float uv = 0; + + if (float(0) == 0) + { + uv = dot(normalize(float4(0,1,0,1)), poiMesh.worldPos * float(10)) + _Time.x * float(1); + } + + if(float(0) == 1) + { + uv = dot(normalize(float4(0,1,0,1)), poiMesh.localPos * float(10)) + _Time.x * float(1); + } + + if(float(0) == 2) + { + uv = dot(float4(0,1,0,1), poiMesh.uv[0] * float(10)) + _Time.x * float(1); + } + float holoRim = saturate(1 - smoothstep(min(float(0.5), float(0.5)), float(0.5), poiCam.viewDotNormal)); + holoRim = abs(lerp(1, holoRim, float(0))); + #if defined(PROP_HOLOALPHAMAP) || !defined(OPTIMIZER_ENABLED) + fixed holoAlpha = UNITY_SAMPLE_TEX2D_SAMPLER(_HoloAlphaMap, _MainTex, uv).r; + #else + fixed holoAlpha = 1; + #endif + color.a *= holoAlpha * holoRim; + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHologram.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHologram.cginc.meta new file mode 100644 index 00000000..11114393 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiHologram.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c4df55ff05768734d84c904da17aa6d8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiIridescence.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiIridescence.cginc new file mode 100644 index 00000000..53b2044c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiIridescence.cginc @@ -0,0 +1,77 @@ +#ifndef POI_IRIDESCENCE + #define POI_IRIDESCENCE + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_IridescenceRamp); float4 _IridescenceRamp_ST; + #endif + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_IridescenceMask); float4 _IridescenceMask_ST; + #endif + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_IridescenceNormalMap); float4 _IridescenceNormalMap_ST; + #endif + float _IridescenceNormalUV; + float _IridescenceMaskUV; + float _IridescenceNormalSelection; + float _IridescenceNormalIntensity; + float _IridescenceNormalToggle; + float _IridescenceIntensity; + fixed _IridescenceAddBlend; + fixed _IridescenceReplaceBlend; + fixed _IridescenceMultiplyBlend; + float _IridescenceEmissionStrength; + + //global + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + float3 calculateNormal(float3 baseNormal) + { + + float3 normal = UnpackScaleNormal(UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceNormalMap, _MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _IridescenceNormalMap)), float(1)); + return normalize( + normal.x * poiMesh.tangent + + normal.y * poiMesh.binormal + + normal.z * baseNormal + ); + } + #endif + void applyIridescence(inout float4 albedo, inout float3 IridescenceEmission) + { + float3 normal = poiMesh.normals[float(1)]; + + #if defined(PROP_IRIDESCENCENORMALMAP) || !defined(OPTIMIZER_ENABLED) + // Use custom normal map + + if (float(0)) + { + normal = calculateNormal(normal); + } + #endif + + float ndotv = dot(normal, poiCam.viewDir); + + #if defined(PROP_IRIDESCENCERAMP) || !defined(OPTIMIZER_ENABLED) + float4 iridescenceColor = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceRamp, _MainTex, 1 - abs(ndotv)); + #else + float4 iridescenceColor = 1; + #endif + + #if defined(PROP_IRIDESCENCEMASK) || !defined(OPTIMIZER_ENABLED) + float4 iridescenceMask = UNITY_SAMPLE_TEX2D_SAMPLER(_IridescenceMask, _MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _IridescenceMask)); + #else + float4 iridescenceMask = 1; + #endif + #ifdef POI_BLACKLIGHT + if(float(4) != 4) + { + iridescenceMask *= blackLightMask[float(4)]; + } + #endif + + + albedo.rgb = lerp(albedo.rgb, saturate(iridescenceColor.rgb * float(1)), iridescenceColor.a * float(0) * iridescenceMask); + albedo.rgb += saturate(iridescenceColor.rgb * float(1) * iridescenceColor.a * float(0) * iridescenceMask); + albedo.rgb *= saturate(lerp(1, iridescenceColor.rgb * float(1), iridescenceColor.a * float(0) * iridescenceMask)); + + IridescenceEmission = saturate(iridescenceColor.rgb * float(1)) * iridescenceColor.a * iridescenceMask * float(0); + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiIridescence.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiIridescence.cginc.meta new file mode 100644 index 00000000..4d40b5bd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiIridescence.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d81caa84d61d8fd45bd870d4e0d030c1 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiLighting.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiLighting.cginc new file mode 100644 index 00000000..e823d58a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiLighting.cginc @@ -0,0 +1,973 @@ + +#ifndef POI_LIGHTING +#define POI_LIGHTING + +float _LightingRampType; +float _LightingIgnoreAmbientColor; +float _UseShadowTexture; +float _LightingEnableAO; +float _LightingDetailShadowsEnabled; + +float _LightingOnlyUnityShadows; +float _LightingMode; +float _ForceLightDirection; +float _ShadowStrength; +float _OutlineShadowStrength; +float _ShadowOffset; +float3 _LightDirection; +float _ForceShadowStrength; +float _CastedShadowSmoothing; +float _AttenuationMultiplier; +float _EnableLighting; +float _LightingControlledUseLightColor; +fixed _LightingStandardSmoothness; +fixed _LightingStandardControlsToon; +fixed _LightingMinLightBrightness; +float _LightingUseShadowRamp; +float _LightingMinShadowBrightnessRatio; +fixed _LightingMonochromatic; + +fixed _LightingGradientStart; +fixed _LightingGradientEnd; +float3 _LightingShadowColor; +float _AOStrength; +fixed _LightingDetailStrength; +fixed _LightingAdditiveDetailStrength; +fixed _LightingNoIndirectMultiplier; +fixed _LightingNoIndirectThreshold; +float _LightingUncapped; + +float _LightingDirectColorMode; +float _LightingIndirectColorMode; +float _LightingAdditiveType; +fixed _LightingAdditiveGradientStart; +fixed _LightingAdditiveGradientEnd; +fixed _LightingAdditivePassthrough; +float _LightingDirectAdjustment; +float _LightingIndirect; +// HSL JUNK +float _LightingEnableHSL; +float _LightingShadowHue; +float _LightingShadowSaturation; +float _LightingShadowLightness; +float _LightingHSLIntensity; +// UTS Style Shade Mapping +float4 _1st_ShadeColor; +float _Use_BaseAs1st; +float4 _2nd_ShadeColor; +float _Use_1stAs2nd; +float _BaseColor_Step; +float _BaseShade_Feather; +float _ShadeColor_Step; +float _1st2nd_Shades_Feather; +float _Use_1stShadeMapAlpha_As_ShadowMask; +float _1stShadeMapMask_Inverse; +float _Tweak_1stShadingGradeMapLevel; +float _Use_2ndShadeMapAlpha_As_ShadowMask; +float _2ndShadeMapMask_Inverse; +float _Tweak_2ndShadingGradeMapLevel; +// Skin +float _SkinScatteringProperties; +float _SssWeight; +float _SssMaskCutoff ; +float _SssBias; +float _SssScale; +float _SssBumpBlur; +float4 _SssTransmissionAbsorption; +float4 _SssColorBleedAoWeights; +/* +UNITY_DECLARE_TEX2D_NOSAMPLER(_ToonRamp3); +half _LightingShadowStrength3; +half _ShadowOffset3; +*/ + +half4 shadowStrength; +sampler2D _SkinLUT; +UNITY_DECLARE_TEX2D(_ToonRamp); +POI_TEXTURE_NOSAMPLER(_1st_ShadeMap); +POI_TEXTURE_NOSAMPLER(_2nd_ShadeMap); +POI_TEXTURE_NOSAMPLER(_LightingDetailShadows); +POI_TEXTURE_NOSAMPLER(_LightingAOTex); +POI_TEXTURE_NOSAMPLER(_LightingShadowMask); + +float3 directLighting; +float3 indirectLighting; +/* +* DJLs code starts here +*/ +float _LightingWrappedWrap; +float _LightingWrappedNormalization; + +// Green’s model with adjustable energy +// http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ +// Modified for adjustable conservation ratio and over-wrap to directionless +float RTWrapFunc(in float dt, in float w, in float norm) +{ + float cw = saturate(w); + + float o = (dt + cw) / ((1.0 + cw) * (1.0 + cw * norm)); + float flt = 1.0 - 0.85 * norm; + if (w > 1.0) + { + o = lerp(o, flt, w - 1.0); + } + return o; +} +float3 GreenWrapSH(float fA) // Greens unoptimized and non-normalized + +{ + float fAs = saturate(fA); + float4 t = float4(fA + 1, fAs - 1, fA - 2, fAs + 1); // DJL edit: allow wrapping to L0-only at w=2 + return float3(t.x, -t.z * t.x / 3, 0.25 * t.y * t.y * t.w); +} +float3 GreenWrapSHOpt(float fW) // optimised and normalized https://blog.selfshadow.com/2012/01/07/righting-wrap-part-2/ + +{ + const float4 t0 = float4(0.0, 1.0 / 4.0, -1.0 / 3.0, -1.0 / 2.0); + const float4 t1 = float4(1.0, 2.0 / 3.0, 1.0 / 4.0, 0.0); + float3 fWs = float3(fW, fW, saturate(fW)); // DJL edit: allow wrapping to L0-only at w=2 + + float3 r; + r.xyz = t0.xxy * fWs + t0.xzw; + r.xyz = r.xyz * fWs + t1.xyz; + return r; +} +float3 ShadeSH9_wrapped(float3 normal, float wrap) +{ + float3 x0, x1, x2; + float3 conv = lerp(GreenWrapSH(wrap), GreenWrapSHOpt(wrap), float(0)); // Should try optimizing this... + conv *= float3(1, 1.5, 4); // Undo pre-applied cosine convolution by using the inverse + + // Constant (L0) + x0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); + // Remove pre-applied constant part from L(2,0) to apply correct convolution + float3 L2_0 = float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / - 3.0; + x0 -= L2_0; + + // Linear (L1) polynomial terms + x1.r = dot(unity_SHAr.xyz, normal); + x1.g = dot(unity_SHAg.xyz, normal); + x1.b = dot(unity_SHAb.xyz, normal); + + // 4 of the quadratic (L2) polynomials + float4 vB = normal.xyzz * normal.yzzx; + x2.r = dot(unity_SHBr, vB); + x2.g = dot(unity_SHBg, vB); + x2.b = dot(unity_SHBb, vB); + + // Final (5th) quadratic (L2) polynomial + float vC = normal.x * normal.x - normal.y * normal.y; + x2 += unity_SHC.rgb * vC; + // Move back the constant part of L(2,0) + x2 += L2_0; + + return x0 * conv.x + x1 * conv.y + x2 * conv.z; +} + +/* +* MIT License +* +* Copyright (c) 2018 s-ilent +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +* SOFTWARE. +*/ + +/* +* Silent's code starts here +*/ + +float shEvaluateDiffuseL1Geomerics_local(float L0, float3 L1, float3 n) +{ + // average energy + float R0 = max(0, L0); + + // avg direction of incoming light + float3 R1 = 0.5f * L1; + + // directional brightness + float lenR1 = length(R1); + + // linear angle between normal and direction 0-1 + //float q = 0.5f * (1.0f + dot(R1 / lenR1, n)); + //float q = dot(R1 / lenR1, n) * 0.5 + 0.5; + float q = dot(normalize(R1), n) * 0.5 + 0.5; + q = saturate(q); // Thanks to ScruffyRuffles for the bug identity. + + // power for q + // lerps from 1 (linear) to 3 (cubic) based on directionality + float p = 1.0f + 2.0f * lenR1 / R0; + + // dynamic range constant + // should vary between 4 (highly directional) and 0 (ambient) + float a = (1.0f - lenR1 / R0) / (1.0f + lenR1 / R0); + + return R0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)); +} + +half3 BetterSH9(half4 normal) +{ + float3 indirect; + float3 L0 = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + indirect.r = shEvaluateDiffuseL1Geomerics_local(L0.r, unity_SHAr.xyz, normal.xyz); + indirect.g = shEvaluateDiffuseL1Geomerics_local(L0.g, unity_SHAg.xyz, normal.xyz); + indirect.b = shEvaluateDiffuseL1Geomerics_local(L0.b, unity_SHAb.xyz, normal.xyz); + indirect = max(0, indirect); + indirect += SHEvalLinearL2(normal); + return indirect; +} + +float3 BetterSH9(float3 normal) +{ + return BetterSH9(float4(normal, 1)); +} + +/* +* Standard stuff starts here +*/ +UnityLight CreateLight(float3 normal, fixed detailShadowMap) +{ + UnityLight light; + light.dir = poiLight.direction; + light.color = saturate(_LightColor0.rgb * lerp(1, poiLight.attenuation, float(0)) * detailShadowMap); + light.ndotl = DotClamped(normal, poiLight.direction); + return light; +} + +float FadeShadows(float attenuation) +{ + #if HANDLE_SHADOWS_BLENDING_IN_GI || ADDITIONAL_MASKED_DIRECTIONAL_SHADOWS + // UNITY_LIGHT_ATTENUATION doesn't fade shadows for us. + + #if ADDITIONAL_MASKED_DIRECTIONAL_SHADOWS + attenuation = lerp(1, poiLight.attenuation, float(0)); + #endif + + float viewZ = dot(_WorldSpaceCameraPos - poiMesh.worldPos, UNITY_MATRIX_V[2].xyz); + float shadowFadeDistance = UnityComputeShadowFadeDistance(poiMesh.worldPos, viewZ); + float shadowFade = UnityComputeShadowFade(shadowFadeDistance); + float bakedAttenuation = UnitySampleBakedOcclusion(poiMesh.lightmapUV.xy, poiMesh.worldPos); + attenuation = UnityMixRealtimeAndBakedShadows( + attenuation, bakedAttenuation, shadowFade + ); + #endif + + return attenuation; +} + +void ApplySubtractiveLighting(inout UnityIndirect indirectLight) +{ + #if SUBTRACTIVE_LIGHTING + poiLight.attenuation = FadeShadows(lerp(1, poiLight.attenuation, float(0))); + + float ndotl = saturate(dot(i.normal, _WorldSpaceLightPos0.xyz)); + float3 shadowedLightEstimate = ndotl * (1 - poiLight.attenuation) * _LightColor0.rgb; + float3 subtractedLight = indirectLight.diffuse - shadowedLightEstimate; + subtractedLight = max(subtractedLight, unity_ShadowColor.rgb); + subtractedLight = lerp(subtractedLight, indirectLight.diffuse, _LightShadowData.x); + indirectLight.diffuse = min(subtractedLight, indirectLight.diffuse); + #endif +} + +float3 weightedBlend(float3 layer1, float3 layer2, float2 weights) +{ + return(weights.x * layer1 + weights.y * layer2) / (weights.x + weights.y); +} + +UnityIndirect CreateIndirectLight(float3 normal) +{ + UnityIndirect indirectLight; + indirectLight.diffuse = 0; + indirectLight.specular = 0; + + #if defined(FORWARD_BASE_PASS) + #if defined(LIGHTMAP_ON) + indirectLight.diffuse = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, poiMesh.lightmapUV.xy)); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 lightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_LightmapInd, unity_Lightmap, poiMesh.lightmapUV.xy + ); + indirectLight.diffuse = DecodeDirectionalLightmap( + indirectLight.diffuse, lightmapDirection, normal + ); + #endif + ApplySubtractiveLighting(indirectLight); + #endif + + #if defined(DYNAMICLIGHTMAP_ON) + float3 dynamicLightDiffuse = DecodeRealtimeLightmap( + UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, poiMesh.lightmapUV.zw) + ); + + #if defined(DIRLIGHTMAP_COMBINED) + float4 dynamicLightmapDirection = UNITY_SAMPLE_TEX2D_SAMPLER( + unity_DynamicDirectionality, unity_DynamicLightmap, + poiMesh.lightmapUV.zw + ); + indirectLight.diffuse += DecodeDirectionalLightmap( + dynamicLightDiffuse, dynamicLightmapDirection, normal + ); + #else + indirectLight.diffuse += dynamicLightDiffuse; + #endif + #endif + + #if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON) + #if UNITY_LIGHT_PROBE_PROXY_VOLUME + if (unity_ProbeVolumeParams.x == 1) + { + indirectLight.diffuse = SHEvalLinearL0L1_SampleProbeVolume( + float4(normal, 1), poiMesh.worldPos + ); + indirectLight.diffuse = max(0, indirectLight.diffuse); + #if defined(UNITY_COLORSPACE_GAMMA) + indirectLight.diffuse = LinearToGammaSpace(indirectLight.diffuse); + #endif + } + else + { + indirectLight.diffuse += max(0, ShadeSH9(float4(normal, 1))); + } + #else + indirectLight.diffuse += max(0, ShadeSH9(float4(normal, 1))); + #endif + #endif + + float3 reflectionDir = reflect(-poiCam.viewDir, normal); + Unity_GlossyEnvironmentData envData; + envData.roughness = 1 - float(0); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin.xyz, unity_SpecCube1_BoxMax.xyz + ); + #if UNITY_SPECCUBE_BLENDING + float interpolator = unity_SpecCube0_BoxMin.w; + + if (interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + indirectLight.specular = lerp(probe1, probe0, interpolator); + } + else + { + indirectLight.specular = probe0; + } + #else + indirectLight.specular = probe0; + #endif + float occlusion = 1; + + if (float(0)) + { + occlusion = lerp(1, POI2D_SAMPLER_PAN(_LightingAOTex, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r, float(1)); + } + + indirectLight.diffuse *= occlusion; + indirectLight.diffuse = max(indirectLight.diffuse, float(0)); + indirectLight.specular *= occlusion; + #endif + + return indirectLight; +} + +/* +* Poiyomi's cool as heck code starts here :smug: +*/ + +half PoiDiffuse(half NdotV, half NdotL, half LdotH) +{ + half fd90 = 0.5 + 2 * LdotH * LdotH * SmoothnessToPerceptualRoughness(.5); + // Two schlick fresnel term + half lightScatter = (1 + (fd90 - 1) * Pow5(1 - NdotL)); + half viewScatter = (1 + (fd90 - 1) * Pow5(1 - NdotV)); + + return lightScatter * viewScatter; +} + +float3 ShadeSH9Indirect() +{ + return ShadeSH9(half4(0.0, -1.0, 0.0, 1.0)); +} + +float3 ShadeSH9Direct() +{ + return ShadeSH9(half4(0.0, 1.0, 0.0, 1.0)); +} + +float3 ShadeSH9Normal(float3 normalDirection) +{ + return ShadeSH9(half4(normalDirection, 1.0)); +} + +half3 GetSHLength() +{ + half3 x, x1; + x.r = length(unity_SHAr); + x.g = length(unity_SHAg); + x.b = length(unity_SHAb); + x1.r = length(unity_SHBr); + x1.g = length(unity_SHBg); + x1.b = length(unity_SHBb); + return x + x1; +} +half3 GetSHDirectionL1() +{ + //float3 grayscale = float3(.3, .59, .11); + float3 grayscale = float3(.33333, .33333, .33333); + half3 r = Unity_SafeNormalize(half3(unity_SHAr.x, unity_SHAr.y, unity_SHAr.z)); + half3 g = Unity_SafeNormalize(half3(unity_SHAg.x, unity_SHAg.y, unity_SHAg.z)); + half3 b = Unity_SafeNormalize(half3(unity_SHAb.x, unity_SHAb.y, unity_SHAb.z)); + return Unity_SafeNormalize(grayscale.r * r + grayscale.g * g + grayscale.b * b); +} +float3 GetSHDirectionL1_() +{ + // For efficiency, we only get the direction from L1. + // Because getting it from L2 would be too hard! + return Unity_SafeNormalize((unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz)); +} +// Returns the value from SH in the lighting direction with the +// brightest intensity. +half3 GetSHMaxL1() +{ + float3 maxDirection = GetSHDirectionL1(); + return ShadeSH9_wrapped(maxDirection, 0); +} + + +float3 calculateRealisticLighting(float4 colorToLight, fixed detailShadowMap) +{ + return UNITY_BRDF_PBS(1, 0, 0, float(0), poiMesh.normals[1], poiCam.viewDir, CreateLight(poiMesh.normals[1], detailShadowMap), CreateIndirectLight(poiMesh.normals[1])).xyz; +} + +void calculateBasePassLightMaps() +{ + #if defined(FORWARD_BASE_PASS) || defined(POI_META_PASS) + float AOMap = 1; + float AOStrength = 0; + float3 lightColor = poiLight.color; + /* + * Generate Basic Light Maps + */ + + bool lightExists = false; + if (all(_LightColor0.rgb >= 0.002)) + { + lightExists = true; + } + #ifndef OUTLINE + + if (float(0)) + { + AOMap = POI2D_SAMPLER_PAN(_LightingAOTex, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + AOStrength = float(1); + poiLight.occlusion = lerp(1, AOMap, AOStrength); + } + #ifdef FORWARD_BASE_PASS + //poiLight.color = saturate(_LightColor0.rgb) + saturate(ShadeSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb))); + if (lightExists) + { + lightColor = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + } + else + { + lightColor = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + } + + //lightColor = magic * magiratio + normalLight * normaRatio; + //lightColor = magic + normalLight; + #endif + #endif + + float3 grayscale_vector = float3(.33333, .33333, .33333); + float3 ShadeSH9Plus = GetSHLength(); + float3 ShadeSH9Minus = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w) + float3(unity_SHBr.z, unity_SHBg.z, unity_SHBb.z) / 3.0; + + shadowStrength = 1; + #ifndef OUTLINE + shadowStrength = POI2D_SAMPLER_PAN(_LightingShadowMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)) * float(0); + #else + shadowStrength = float(1); + #endif + + float bw_lightColor = dot(lightColor, grayscale_vector); + float bw_directLighting = (((poiLight.nDotL * 0.5 + 0.5) * bw_lightColor * lerp(1, poiLight.attenuation, float(0))) + dot(ShadeSH9Normal(poiMesh.normals[1]), grayscale_vector)); + float bw_bottomIndirectLighting = dot(ShadeSH9Minus, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus, grayscale_vector); + float lightDifference = ((bw_topIndirectLighting + bw_lightColor) - bw_bottomIndirectLighting); + + fixed detailShadow = 1; + + if (float(0)) + { + detailShadow = lerp(1, POI2D_SAMPLER_PAN(_LightingDetailShadows, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(1)).r; + } + + if (float(0)) + { + poiLight.lightMap = poiLight.attenuation; + } + else + { + poiLight.lightMap = smoothstep(0, lightDifference, bw_directLighting - bw_bottomIndirectLighting); + } + poiLight.lightMap *= detailShadow; + + /* + * Decide on light colors + */ + + indirectLighting = 0; + directLighting = 0; + + + + + if (float(0) == 1) + { + indirectLighting = BetterSH9(float4(poiMesh.normals[1], 1)); + } + else + { + indirectLighting = ShadeSH9Minus; + } + + poiLight.directLighting = lightColor; + poiLight.indirectLighting = indirectLighting; + + + if (float(0) == 0) + { + float3 magic = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + float3 normalLight = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)); + + float magiLumi = calculateluminance(magic); + float normaLumi = calculateluminance(normalLight); + float maginormalumi = magiLumi + normaLumi; + + float magiratio = magiLumi / maginormalumi; + float normaRatio = normaLumi / maginormalumi; + + float target = calculateluminance(magic * magiratio + normalLight * normaRatio); + float3 properLightColor = magic * AOMap + normalLight; + float properLuminance = calculateluminance(magic + normalLight); + directLighting = properLightColor * max(0.0001, (target / properLuminance)); + } + else + { + if (lightExists) + { + directLighting = _LightColor0.rgb + BetterSH9(float4(0, 0, 0, 1)) * AOMap; + } + else + { + directLighting = max(BetterSH9(normalize(unity_SHAr + unity_SHAg + unity_SHAb)), 0); + } + } + + + if (!float(0)) + { + float directluminance = calculateluminance(directLighting); + float indirectluminance = calculateluminance(indirectLighting); + directLighting = min(directLighting, directLighting / max(0.0001, (directluminance / 1))); + indirectLighting = min(indirectLighting, indirectLighting / max(0.0001, (indirectluminance / 1))); + } + + directLighting = lerp(directLighting, dot(directLighting, float3(0.299, 0.587, 0.114)), float(0)); + indirectLighting = lerp(indirectLighting, dot(indirectLighting, float3(0.299, 0.587, 0.114)), float(0)); + + if (max(max(indirectLighting.x, indirectLighting.y), indirectLighting.z) <= _LightingNoIndirectThreshold && max(max(directLighting.x, directLighting.y), directLighting.z) >= 0) + { + indirectLighting = directLighting * _LightingNoIndirectMultiplier; + } + + + if (float(0)) + { + float directluminance = clamp(directLighting.r * 0.299 + directLighting.g * 0.587 + directLighting.b * 0.114, 0, 1); + if (directluminance > 0) + { + indirectLighting = max(0.001, indirectLighting); + } + float indirectluminance = clamp(indirectLighting.r * 0.299 + indirectLighting.g * 0.587 + indirectLighting.b * 0.114, 0, 1); + float targetluminance = directluminance * float(0); + if (indirectluminance < targetluminance) + { + indirectLighting = indirectLighting / max(0.0001, indirectluminance / targetluminance); + } + } + + poiLight.rampedLightMap = 1 - smoothstep(0, .5, 1 - poiLight.lightMap); + poiLight.finalLighting = directLighting; + + /* + * Create Gradiant Maps + */ + switch(float(0)) + { + case 0: // Ramp Texture + + { + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + float(0)).rgb, shadowStrength.r); + + if (float(0)) + { + poiLight.finalLighting = lerp(poiLight.rampedLightMap * directLighting * lerp(1, AOMap, AOStrength), directLighting, poiLight.rampedLightMap); + } + else + { + poiLight.finalLighting = lerp(indirectLighting * lerp(1, AOMap, AOStrength), directLighting, poiLight.rampedLightMap); + } + } + break; + case 1: // Math Gradient + + { + poiLight.rampedLightMap = saturate(1 - smoothstep(float(0) - .000001, float(0.5), 1 - poiLight.lightMap)); + float3 shadowColor = float4(1,1,1,1); + + if (_UseShadowTexture) + { + shadowColor = 1; + } + + if (float(0)) + { + poiLight.finalLighting = lerp((directLighting * shadowColor * lerp(1, AOMap, AOStrength)), (directLighting), saturate(poiLight.rampedLightMap + 1 - float(0))); + } + else + { + poiLight.finalLighting = lerp((indirectLighting * shadowColor * lerp(1, AOMap, AOStrength)), (directLighting), saturate(poiLight.rampedLightMap + 1 - float(0))); + } + } + break; + case 2: + { + poiLight.rampedLightMap = saturate(1 - smoothstep(0, .5, 1 - poiLight.lightMap)); + poiLight.finalLighting = directLighting; + } + break; + } + + // DJL stuff + if (float(4) == 2) // Wrapped + + { + float wrap = float(0); + + float3 directcolor = (_LightColor0.rgb) * saturate(RTWrapFunc(poiLight.nDotL, wrap, float(0))); + float directatten = lerp(1, poiLight.attenuation, float(0)); + + uint normalsindex = float(0) > 0 ? 1: 0; + // if (float(0) == 1) + // { + // surfnormals = poiMesh.normals[1]; + // } + // else + // { + // surfnormals = poiMesh.normals[0]; + // } + float3 envlight = ShadeSH9_wrapped(poiMesh.normals[normalsindex], wrap); + envlight *= lerp(1, AOMap, AOStrength); + + poiLight.directLighting = directcolor * detailShadow * directatten; + poiLight.indirectLighting = envlight; + + float3 ShadeSH9Plus_2 = GetSHMaxL1(); + float bw_topDirectLighting_2 = dot(_LightColor0.rgb, grayscale_vector); + float bw_directLighting = dot(poiLight.directLighting, grayscale_vector); + float bw_indirectLighting = dot(poiLight.indirectLighting, grayscale_vector); + float bw_topIndirectLighting = dot(ShadeSH9Plus_2, grayscale_vector); + + //poiLight.lightMap = saturate(dot(poiLight.indirectLighting + poiLight.directLighting, grayscale_vector)); + poiLight.lightMap = smoothstep(0, bw_topIndirectLighting + bw_topDirectLighting_2, bw_indirectLighting + bw_directLighting); + + poiLight.rampedLightMap = 1; + + if (float(0) == 0) // Ramp Texture + + { + poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, poiLight.lightMap + float(0)).rgb, shadowStrength.r); + } + else if (float(0) == 1) // Math Gradient + + { + poiLight.rampedLightMap = lerp(float4(1,1,1,1) * lerp(poiLight.indirectLighting, 1, float(0)), float3(1, 1, 1), saturate(1 - smoothstep(float(0) - .000001, float(0.5), 1 - poiLight.lightMap))); + poiLight.rampedLightMap = lerp(float3(1, 1, 1), poiLight.rampedLightMap, shadowStrength.r); + } + + poiLight.finalLighting = (poiLight.indirectLighting + poiLight.directLighting) * saturate(poiLight.rampedLightMap + 1 - float(0)); + } + + if (!float(0)) + { + poiLight.finalLighting = saturate(poiLight.finalLighting); + } + //poiLight.finalLighting *= .8; + #endif + } + + /* + void applyShadowTexture(inout float4 albedo) + { + + if (_UseShadowTexture && float(0) == 1) + { + albedo.rgb = lerp(albedo.rgb, POI2D_SAMPLER_PAN(_LightingShadowTexture, _MainTex, poiMesh.uv[_LightingShadowTextureUV], _LightingShadowTexturePan) * float4(1,1,1,1), (1 - poiLight.rampedLightMap) * shadowStrength); + } + } + */ + + float3 calculateNonImportantLighting(float attenuation, float attenuationDotNL, float3 albedo, float3 lightColor, half dotNL, half correctedDotNL) + { + fixed detailShadow = 1; + + if (float(0)) + { + detailShadow = lerp(1, POI2D_SAMPLER_PAN(_LightingDetailShadows, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(1)).r; + } + + if (float(1) == 0) + { + return lightColor * attenuationDotNL * detailShadow; // Realistic + + } + else if (float(1) == 1) // Toon + + { + return lerp(lightColor * attenuation, lightColor * float(0.5) * attenuation, smoothstep(float(0), float(0.5), dotNL)) * detailShadow; + } + else //if(float(1) == 2) // Wrapped + + { + float uv = saturate(RTWrapFunc(-dotNL, float(0), float(0))) * detailShadow; + + poiLight.rampedLightMap = 1; + if (float(0) == 1) // Math Gradient + poiLight.rampedLightMap = lerp(float4(1,1,1,1), float3(1, 1, 1), saturate(1 - smoothstep(float(0) - .000001, float(0.5), 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + + return lightColor * poiLight.rampedLightMap * saturate(attenuation * uv); + } + } + + void applyShadeMaps(inout float4 albedo) + { + + if (float(0) == 2) + { + float3 baseColor = albedo.rgb; + + float MainColorFeatherStep = float(0.5) - float(0.0001); + float firstColorFeatherStep = float(0) - float(0.0001); + + #if defined(PROP_1ST_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 firstShadeMap = POI2D_SAMPLER_PAN(_1st_ShadeMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 firstShadeMap = float4(1, 1, 1, 1); + #endif + firstShadeMap = lerp(firstShadeMap, albedo, float(0)); + firstShadeMap.rgb *= float4(1,1,1,1).rgb; //* lighColor + + #if defined(PROP_2ND_SHADEMAP) || !defined(OPTIMIZER_ENABLED) + float4 secondShadeMap = POI2D_SAMPLER_PAN(_2nd_ShadeMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 secondShadeMap = float4(1, 1, 1, 1); + #endif + secondShadeMap = lerp(secondShadeMap, firstShadeMap, float(0)); + secondShadeMap.rgb *= float4(1,1,1,1).rgb; //* LightColor; + + + float shadowMask = 1; + shadowMask *= float(0) ?(float(0) ?(1.0 - firstShadeMap.a): firstShadeMap.a): 1; + shadowMask *= float(0) ?(float(0) ?(1.0 - secondShadeMap.a): secondShadeMap.a): 1; + + float mainShadowMask = saturate(1 - ((poiLight.lightMap) - MainColorFeatherStep) / (float(0.5) - MainColorFeatherStep) * (shadowMask)); + float firstSecondShadowMask = saturate(1 - ((poiLight.lightMap) - firstColorFeatherStep) / (float(0) - firstColorFeatherStep) * (shadowMask)); + + #if defined(PROP_LIGHTINGSHADOWMASK) || !defined(OPTIMIZER_ENABLED) + float removeShadow = POI2D_SAMPLER_PAN(_LightingShadowMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + float removeShadow = 1; + #endif + mainShadowMask *= removeShadow; + firstSecondShadowMask *= removeShadow; + + albedo.rgb = lerp(albedo.rgb, lerp(firstShadeMap.rgb, secondShadeMap.rgb, firstSecondShadowMask), mainShadowMask); + } + } + + float3 calculateFinalLighting(inout float3 albedo, float4 finalColor) + { + float3 finalLighting = 1; + // Additive Lighting + #ifdef FORWARD_ADD_PASS + fixed detailShadow = 1; + + if (float(0)) + { + detailShadow = lerp(1, POI2D_SAMPLER_PAN(_LightingDetailShadows, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(1)).r; + } + + if (float(1) == 0) // Realistic + + { + finalLighting = poiLight.color * poiLight.attenuation * max(0, poiLight.nDotL) * detailShadow; + } + else if (float(1) == 1) // Toon + + { + #if defined(POINT) || defined(SPOT) + finalLighting = lerp(poiLight.color * max(poiLight.additiveShadow, float(0.5)), poiLight.color * float(0.5), smoothstep(float(0), float(0.5), 1 - (.5 * poiLight.nDotL + .5))) * poiLight.attenuation * detailShadow; + #else + finalLighting = lerp(poiLight.color * max(poiLight.attenuation, float(0.5)), poiLight.color * float(0.5), smoothstep(float(0), float(0.5), 1 - (.5 * poiLight.nDotL + .5))) * detailShadow; + #endif + } + else //if(float(1) == 2) // Wrapped + + { + float uv = saturate(RTWrapFunc(poiLight.nDotL, float(0), float(0))) * detailShadow; + + poiLight.rampedLightMap = 1; + + if (float(0) == 1) // Math Gradient + poiLight.rampedLightMap = lerp(float4(1,1,1,1), float3(1, 1, 1), saturate(1 - smoothstep(float(0) - .000001, float(0.5), 1 - uv))); + // TODO: ramp texture or full shade/tint map for atlasing + //poiLight.rampedLightMap = lerp(1, UNITY_SAMPLE_TEX2D(_ToonRamp, float2(uv + float(0), 1)), shadowStrength.r); + + float shadowatten = max(poiLight.additiveShadow, float(0.5)); + return poiLight.color * poiLight.rampedLightMap * saturate(poiLight.attenuation * uv * shadowatten); + } + #endif + + // Base and Meta Lighting + #if defined(FORWARD_BASE_PASS) || defined(POI_META_PASS) + #ifdef VERTEXLIGHT_ON + poiLight.vFinalLighting = 0; + + for (int index = 0; index < 4; index++) + { + poiLight.vFinalLighting += calculateNonImportantLighting(poiLight.vAttenuation[index], poiLight.vAttenuationDotNL[index], albedo, poiLight.vColor[index], poiLight.vDotNL[index], poiLight.vCorrectedDotNL[index]); + } + #endif + + switch(float(4)) + { + case 0: // Toon Lighting + case 2: // or wrapped + + { + // HSL Shading + + if (float(0)) + { + float3 HSLMod = float3(float(0.5) * 2 - 1, float(0.5) * 2 - 1, float(0.5) * 2 - 1) * (1 - poiLight.rampedLightMap); + albedo = lerp(albedo.rgb, ModifyViaHSL(albedo.rgb, HSLMod), float(1)); + } + + // Normal Shading + + if (float(0) > 0) + { + poiLight.finalLighting = max(0.001, poiLight.finalLighting); + float finalluminance = calculateluminance(poiLight.finalLighting); + finalLighting = max(poiLight.finalLighting, poiLight.finalLighting / max(0.0001, (finalluminance / float(0)))); + } + else + { + finalLighting = poiLight.finalLighting; + } + } + break; + case 1: // realistic + + { + fixed detailShadow = 1; + + if (float(0)) + { + detailShadow = lerp(1, POI2D_SAMPLER_PAN(_LightingDetailShadows, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(1)).r; + } + + float3 realisticLighting = calculateRealisticLighting(finalColor, detailShadow).rgb; + finalLighting = lerp(realisticLighting, dot(realisticLighting, float3(0.299, 0.587, 0.114)), float(0)); + } + break; + case 3: // Skin + + { + float subsurfaceShadowWeight = 0.0h; + float3 ambientNormalWorld = poiMesh.normals[1];//aTangentToWorld(s, s.blurredNormalTangent); + + // Scattering mask. + float subsurface = 1; + float skinScatteringMask = _SssWeight * saturate(1.0h / _SssMaskCutoff * subsurface); + float skinScattering = saturate(subsurface * float(1) * 2 + _SssBias); + + // Skin subsurface depth absorption tint. + // cf http://www.crytek.com/download/2014_03_25_CRYENGINE_GDC_Schultz.pdf pg 35 + half3 absorption = exp((1.0h - subsurface) * float4(-8,-40,-64,0).rgb); + + // Albedo scale for absorption assumes ~0.5 luminance for Caucasian skin. + absorption *= saturate(finalColor.rgb * unity_ColorSpaceDouble.rgb); + + // Blurred normals for indirect diffuse and direct scattering. + ambientNormalWorld = normalize(lerp(poiMesh.normals[1], ambientNormalWorld, float(0.7))); + + float ndlBlur = dot(poiMesh.normals[1], poiLight.direction) * 0.5h + 0.5h; + float lumi = dot(poiLight.color, half3(0.2126h, 0.7152h, 0.0722h)); + float4 sssLookupUv = float4(ndlBlur, skinScattering * lumi, 0.0f, 0.0f); + half3 sss = poiLight.lightMap * poiLight.attenuation * tex2Dlod(_SkinLUT, sssLookupUv).rgb; + finalLighting = min(lerp(indirectLighting * float4(1,1,1,1), float4(1,1,1,1), float(0)) + (sss * directLighting), directLighting); + } + break; + case 4: + { + finalLighting = directLighting; + } + break; + } + #endif + return finalLighting; + } + + + void applyLighting(inout float4 finalColor, float3 finalLighting) + { + #ifdef VERTEXLIGHT_ON + finalColor.rgb *= finalLighting + poiLight.vFinalLighting; + #else + //finalColor.rgb = blendSoftLight(finalColor.rgb, finalLighting); + //finalColor.rgb *= saturate(poiLight.directLighting); + finalColor.rgb *= finalLighting; + #endif + } + #endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiLighting.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiLighting.cginc.meta new file mode 100644 index 00000000..cfaf3b50 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiLighting.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 32b62853fa0e7d74e8391f516a193347 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMSDF.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMSDF.cginc new file mode 100644 index 00000000..c23736df --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMSDF.cginc @@ -0,0 +1,243 @@ +#ifndef POI_MSDF + #define POI_MSDF + + sampler2D _TextGlyphs; + float4 _TextGlyphs_ST; + float4 _TextGlyphs_TexelSize; + float _TextFPSUV; + float _TextTimeUV; + float _TextPositionUV; + float _TextPixelRange; + + float _TextFPSEnabled; + float _TextPositionEnabled; + float _TextTimeEnabled; + + + float4 _TextFPSColor; + half _TextFPSEmissionStrength; + fixed4 _TextFPSPadding; + half2 _TextFPSOffset; + half2 _TextFPSScale; + half _TextFPSRotation; + + fixed _TextPositionVertical; + float4 _TextPositionColor; + half _TextPositionEmissionStrength; + fixed4 _TextPositionPadding; + half2 _TextPositionOffset; + half2 _TextPositionScale; + half _TextPositionRotation; + + float4 _TextTimeColor; + half _TextTimeEmissionStrength; + fixed4 _TextTimePadding; + half2 _TextTimeOffset; + half2 _TextTimeScale; + half _TextTimeRotation; + + #define glyphWidth 0.0625 + + #define ASCII_LEFT_PARENTHESIS 40 + #define ASCII_RIGHT_PARENTHESIS 41 + #define ASCII_POSITIVE 43 + #define ASCII_PERIOD 46 + #define ASCII_NEGATIVE 45 + #define ASCII_COMMA 44 + #define ASCII_E 69 + #define ASCII_F 70 + #define ASCII_I 73 + #define ASCII_M 77 + #define ASCII_O 79 + #define ASCII_P 80 + #define ASCII_S 83 + #define ASCII_T 54 + #define ASCII_SEMICOLON 58 + + float3 globalTextEmission; + + half2 getAsciiCoordinate(float index) + { + return half2((index - 1) / 16, 1 - ((floor(index / 16 - glyphWidth)) / 16)); + } + + float median(float r, float g, float b) + { + return max(min(r, g), min(max(r, g), b)); + } + + void ApplyPositionText(inout float4 albedo, float2 uv) + { + float3 cameraPos = clamp(getCameraPosition(), -999, 999); + float3 absCameraPos = abs(cameraPos); + float totalCharacters = 20; + float positionArray[20]; + positionArray[0] = cameraPos.x >= 0 ? ASCII_NEGATIVE: ASCII_POSITIVE; + positionArray[1] = floor((absCameraPos.x * .01) % 10) + 48; + positionArray[2] = floor((absCameraPos.x * .1) % 10) + 48; + positionArray[3] = floor(absCameraPos.x % 10) + 48; + positionArray[4] = ASCII_PERIOD; + positionArray[5] = floor((absCameraPos.x * 10) % 10) + 48; + positionArray[6] = ASCII_COMMA; + positionArray[7] = cameraPos.y >= 0 ? ASCII_NEGATIVE: ASCII_POSITIVE; + positionArray[8] = floor((absCameraPos.y * .01) % 10) + 48; + positionArray[9] = floor((absCameraPos.y * .1) % 10) + 48; + positionArray[10] = floor(absCameraPos.y % 10) + 48; + positionArray[11] = ASCII_PERIOD; + positionArray[12] = floor((absCameraPos.y * 10) % 10) + 48; + positionArray[13] = ASCII_COMMA; + positionArray[14] = cameraPos.z >= 0 ? ASCII_NEGATIVE: ASCII_POSITIVE; + positionArray[15] = floor((absCameraPos.z * .01) % 10) + 48; + positionArray[16] = floor((absCameraPos.z * .1) % 10) + 48; + positionArray[17] = floor(absCameraPos.z % 10) + 48; + positionArray[18] = ASCII_PERIOD; + positionArray[19] = floor((absCameraPos.z * 10) % 10) + 48; + + uv = TransformUV(float4(0,0,0,0), float(0), float4(1,1,1,1), uv); + + if (uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + half2 glyphPos = getAsciiCoordinate(positionArray[currentCharacter]); + + float2 startUV = float2(1 / totalCharacters * currentCharacter, 0); + float2 endUV = float2(1 / totalCharacters * (currentCharacter + 1), 1); + + fixed4 textPositionPadding = float4(0,0,0,0); + textPositionPadding *= 1 / totalCharacters; + uv = remapClamped(uv, startUV, endUV, float2(glyphPos.x + textPositionPadding.x, glyphPos.y - glyphWidth + textPositionPadding.y), float2(glyphPos.x + glyphWidth - textPositionPadding.z, glyphPos.y - textPositionPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textPositionPadding.z - .001 || uv.x < glyphPos.x + textPositionPadding.x + .001 || uv.y > glyphPos.y - textPositionPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textPositionPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = float(4) / float4(1,1,1,1).zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + albedo.rgb = lerp(albedo.rgb, float4(1,0,1,1).rgb, opacity * float4(1,0,1,1).a); + globalTextEmission += float4(1,0,1,1).rgb * opacity * float(0); + } + + void ApplyTimeText(inout float4 albedo, float2 uv) + { + float instanceTime = _Time.y; + float hours = instanceTime / 3600; + float minutes = (instanceTime / 60) % 60; + float seconds = instanceTime % 60; + float totalCharacters = 8; + float timeArray[8]; + timeArray[0] = floor((hours * .1) % 10) + 48; + timeArray[1] = floor(hours % 10) + 48; + timeArray[2] = ASCII_SEMICOLON; + timeArray[3] = floor((minutes * .1) % 10) + 48; + timeArray[4] = floor(minutes % 10) + 48; + timeArray[5] = ASCII_SEMICOLON; + timeArray[6] = floor((seconds * .1) % 10) + 48; + timeArray[7] = floor(seconds % 10) + 48; + + uv = TransformUV(float4(0,0,0,0), float(0), float4(1,1,1,1), uv); + + if(uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + half2 glyphPos = getAsciiCoordinate(timeArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + fixed4 textTimePadding = float4(0,0,0,0); + textTimePadding *= 1 / totalCharacters; + uv = remapClamped(uv, float2(startUV, 0), float2(endUV, 1), float2(glyphPos.x + textTimePadding.x, glyphPos.y - glyphWidth + textTimePadding.y), float2(glyphPos.x + glyphWidth - textTimePadding.z, glyphPos.y - textTimePadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textTimePadding.z - .001 || uv.x < glyphPos.x + textTimePadding.x + .001 || uv.y > glyphPos.y - textTimePadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textTimePadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = float(4) / float4(1,1,1,1).zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + albedo.rgb = lerp(albedo.rgb, float4(1,0,1,1).rgb, opacity * float4(1,0,1,1).a); + globalTextEmission += float4(1,0,1,1).rgb * opacity * float(0); + } + + void ApplyFPSText(inout float4 albedo, float2 uv) + { + float smoothDeltaTime = clamp(unity_DeltaTime.w, 0, 999); + float totalCharacters = 7; + float fpsArray[7]; + fpsArray[0] = ASCII_F; + fpsArray[1] = ASCII_P; + fpsArray[2] = ASCII_S; + fpsArray[3] = ASCII_SEMICOLON; + fpsArray[4] = floor((smoothDeltaTime * .01) % 10) + 48; + fpsArray[5] = floor((smoothDeltaTime * .1) % 10) + 48; + fpsArray[6] = floor(smoothDeltaTime % 10) + 48; + + uv = TransformUV(float4(0,0,0,0), float(0), float4(1,1,1,1), uv); + + if(uv.x > 1 || uv.x < 0 || uv.y > 1 || uv.y < 0) + { + return; + } + + float currentCharacter = floor(uv.x * totalCharacters); + half2 glyphPos = getAsciiCoordinate(fpsArray[currentCharacter]); + // 0.1428571 = 1/7 = 1 / totalCharacters + float startUV = 1 / totalCharacters * currentCharacter; + float endUV = 1 / totalCharacters * (currentCharacter + 1); + + fixed4 textFPSPadding = float4(0,0,0,0); + textFPSPadding *= 1 / totalCharacters; + uv = remapClamped(uv, float2(startUV, 0), float2(endUV, 1), float2(glyphPos.x + textFPSPadding.x, glyphPos.y - glyphWidth + textFPSPadding.y), float2(glyphPos.x + glyphWidth - textFPSPadding.z, glyphPos.y - textFPSPadding.w)); + + if (uv.x > glyphPos.x + glyphWidth - textFPSPadding.z - .001 || uv.x < glyphPos.x + textFPSPadding.x + .001 || uv.y > glyphPos.y - textFPSPadding.w - .001 || uv.y < glyphPos.y - glyphWidth + textFPSPadding.y + .001) + { + return; + } + + float3 samp = tex2D(_TextGlyphs, TRANSFORM_TEX(uv, _TextGlyphs)).rgb; + float2 msdfUnit = float(4) / float4(1,1,1,1).zw; + float sigDist = median(samp.r, samp.g, samp.b) - 0.5; + sigDist *= max(dot(msdfUnit, 0.5 / fwidth(uv)), 1); + float opacity = clamp(sigDist + 0.5, 0, 1); + albedo.rgb = lerp(albedo.rgb, float4(1,1,1,1).rgb, opacity * float4(1,1,1,1).a); + globalTextEmission += float4(1,1,1,1).rgb * opacity * float(0); + } + + void ApplyTextOverlayColor(inout float4 albedo, inout float3 textOverlayEmission) + { + globalTextEmission = 0; + half positionalOpacity = 0; + #ifdef EFFECT_BUMP + + if(float(0)) + { + ApplyFPSText(albedo, poiMesh.uv[float(0)]); + } + + if(float(0)) + { + ApplyPositionText(albedo, poiMesh.uv[float(0)]); + } + + if(float(0)) + { + ApplyTimeText(albedo, poiMesh.uv[float(0)]); + } + + textOverlayEmission = globalTextEmission; + #endif + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMSDF.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMSDF.cginc.meta new file mode 100644 index 00000000..eaf9c95b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMSDF.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5ffc4ece2834245419ce128c0e4f3bd1 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMacros.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMacros.cginc new file mode 100644 index 00000000..b7be4d0b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMacros.cginc @@ -0,0 +1,40 @@ +#ifndef POI_MACROS + #define POI_MACROS + + #define POI_TEXTURE_NOSAMPLER(tex) Texture2D tex; float4 tex##_ST; float2 tex##Pan; uint tex##UV + #define POI_TEXTURE(tex) UNITY_DECLARE_TEX2D(tex##); float4 tex##_ST; float2 tex##Pan; uint tex##UV + #define POI_NORMAL_NOSAMPLER(tex) Texture2D tex; float4 tex##_ST; float2 tex##Pan; uint tex##UV; float tex##Scale + + #define POI2D_SAMPLER_PAN(tex, texSampler, uv, pan) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, TRANSFORM_TEX(uv, tex) + _Time.x * pan)) + #define POI2D_SAMPLER(tex, texSampler, uv) (UNITY_SAMPLE_TEX2D_SAMPLER(tex, texSampler, TRANSFORM_TEX(uv, tex))) + #define POI2D_PAN(tex, uv, pan) (tex2D(tex, TRANSFORM_TEX(uv, tex) + _Time.x * pan)) + #define POI2D(tex, uv) (tex2D(tex, TRANSFORM_TEX(uv, tex))) + #define POI_SAMPLE_TEX2D(tex, uv) (UNITY_SAMPLE_TEX2D(tex, TRANSFORM_TEX(uv, tex))) + #define POI_SAMPLE_TEX2D_PAN(tex, uv, pan) (UNITY_SAMPLE_TEX2D(tex, TRANSFORM_TEX(uv, tex) + _Time.x * pan)) + + #ifdef POINT + # define POI_LIGHT_ATTENUATION(destName, shadow, input, worldPos) \ + unityShadowCoord3 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(worldPos, 1)).xyz; \ + fixed shadow = UNITY_SHADOW_ATTENUATION(input, worldPos); \ + fixed destName = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).r; + #endif + + #ifdef SPOT + #if !defined(UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS) + #define DECLARE_LIGHT_COORD(input, worldPos) unityShadowCoord4 lightCoord = mul(unity_WorldToLight, unityShadowCoord4(worldPos, 1)) + #else + #define DECLARE_LIGHT_COORD(input, worldPos) unityShadowCoord4 lightCoord = input._LightCoord + #endif + # define POI_LIGHT_ATTENUATION(destName, shadow, input, worldPos) \ + DECLARE_LIGHT_COORD(input, worldPos); \ + fixed shadow = UNITY_SHADOW_ATTENUATION(input, worldPos); \ + fixed destName = (lightCoord.z > 0) * UnitySpotCookie(lightCoord) * UnitySpotAttenuate(lightCoord.xyz); + #endif + + #if defined(UNITY_COMPILER_HLSL) + #define PoiInitStruct(type,name) name = (type)0; + #else + #define PoiInitStruct(type,name) + #endif + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMacros.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMacros.cginc.meta new file mode 100644 index 00000000..206b9d6c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMacros.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f055c66986907c14097b6de8d8994d23 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMainTex.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMainTex.cginc new file mode 100644 index 00000000..c6a7dc2b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMainTex.cginc @@ -0,0 +1,180 @@ +#ifndef POI_MAINTEXTURE +#define POI_MAINTEXTURE + + +#if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_ClippingMask); +#endif +#if defined(PROP_MAINFADETEXTURE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_MainFadeTexture); +#endif + +float _Inverse_Clipping; +float4 _Color; +float _MainVertexColoring; +float _MainUseVertexColorAlpha; +float _Saturation; +float2 _MainDistanceFade; +half _MainMinAlpha; +float _MainHueShift; +#ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_MainColorAdjustTexture); + #endif + float _MainHueShiftToggle; + float _MainHueShiftSpeed; + float _MainHueShiftReplace; + float _MainSaturationShift; + float _MainBrightness; +#endif + +#ifdef FINALPASS + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DetailTex); + #endif + half _DetailTexIntensity; + half3 _DetailTint; + float _DetailBrightness; +#endif +//globals +float alphaMask; +half3 diffColor; + +#include "CGI_PoiBackFace.cginc" + +float3 wireframeEmission; + +inline FragmentCommonData SpecularSetup(float4 i_tex, inout float4 albedo) +{ + half4 specGloss = 0; + half3 specColor = specGloss.rgb; + half smoothness = specGloss.a; + + half oneMinusReflectivity; + diffColor = EnergyConservationBetweenDiffuseAndSpecular(albedo.rgb, specColor, /*out*/ oneMinusReflectivity); + + FragmentCommonData o = (FragmentCommonData)0; + o.diffColor = diffColor; + o.specColor = specColor; + o.oneMinusReflectivity = oneMinusReflectivity; + o.smoothness = smoothness; + return o; +} + +inline FragmentCommonData FragmentSetup(float4 i_tex, half3 i_viewDirForParallax, float3 i_posWorld, inout float4 albedo) +{ + i_tex = i_tex; + + FragmentCommonData o = SpecularSetup(i_tex, albedo); + o.normalWorld = float3(0, 0, 0); + o.eyeVec = poiCam.viewDir; + o.posWorld = i_posWorld; + + // NOTE: shader relies on pre-multiply alpha-blend (float(1) = One, float(0) = OneMinusSrcAlpha) + o.diffColor = PreMultiplyAlpha(o.diffColor, 1, o.oneMinusReflectivity, /*out*/ o.alpha); + return o; +} + +void initTextureData(inout float4 albedo, inout float4 mainTexture, inout float3 backFaceEmission, inout float3 dissolveEmission, in half3 detailMask) +{ + dissolveEmission = 0; + + #if (defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + #ifdef POI_MIRROR + applyMirrorTexture(mainTexture); + #endif + #endif + #if defined(PROP_CLIPPINGMASK) || !defined(OPTIMIZER_ENABLED) + alphaMask = POI2D_SAMPLER_PAN(_ClippingMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + alphaMask = 1; + #endif + + if (float(0)) + { + alphaMask = 1 - alphaMask; + } + mainTexture.a *= alphaMask; + + #ifndef POI_SHADOW + albedo = float4(mainTexture.rgb * max(float4(0.8176128,0.7916633,0.7916633,1).rgb, float3(0.000000001, 0.000000001, 0.000000001)) * lerp(1, GammaToLinearSpace(poiMesh.vertexColor.rgb), float(0)), mainTexture.a * max(float4(0.8176128,0.7916633,0.7916633,1).a, 0.0000001)); + + #if defined(POI_LIGHTING) && defined(FORWARD_BASE_PASS) + applyShadeMaps(albedo); + #endif + + albedo *= lerp(1, poiMesh.vertexColor.a, float(0)); + #ifdef POI_RGBMASK + albedo.rgb = calculateRGBMask(albedo.rgb); + #endif + + albedo.a = saturate(float(0) + albedo.a); + + wireframeEmission = 0; + #ifdef POI_WIREFRAME + applyWireframe(wireframeEmission, albedo); + #endif + float backFaceDetailIntensity = 1; + + float mixedHueShift = float(0); + applyBackFaceTexture(backFaceDetailIntensity, mixedHueShift, albedo, backFaceEmission); + + #ifdef POI_FUR + calculateFur(); + #endif + + #ifdef COLOR_GRADING_HDR + #if defined(PROP_MAINCOLORADJUSTTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 hueShiftAlpha = POI2D_SAMPLER_PAN(_MainColorAdjustTexture, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 hueShiftAlpha = 1; + #endif + + if (float(0)) + { + albedo.rgb = lerp(albedo.rgb, hueShift(albedo.rgb, mixedHueShift + float(0) * _Time.x), hueShiftAlpha.r); + } + else + { + albedo.rgb = hueShift(albedo.rgb, frac((mixedHueShift - (1 - hueShiftAlpha.r) + float(0) * _Time.x))); + } + + albedo.rgb = lerp(albedo.rgb, dot(albedo.rgb, float3(0.3, 0.59, 0.11)), -float(0) * hueShiftAlpha.b); + albedo.rgb = saturate(albedo.rgb + float(0) * hueShiftAlpha.g); + #endif + #ifdef FINALPASS + #if defined(PROP_DETAILTEX) || !defined(OPTIMIZER_ENABLED) + half3 detailTexture = POI2D_SAMPLER_PAN(_DetailTex, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).rgb * float4(1,1,1,1).rgb; + #else + half3 detailTexture = 0.21763764082 * float4(1,1,1,1).rgb; + #endif + albedo.rgb *= LerpWhiteTo(detailTexture * float(1) * unity_ColorSpaceDouble.rgb, detailMask.r * float(1) * backFaceDetailIntensity); + #endif + albedo.rgb = saturate(albedo.rgb); + + #ifdef POI_HOLOGRAM + ApplyHoloAlpha(albedo); + #endif + + s = FragmentSetup(float4(poiMesh.uv[0], 1, 1), poiCam.viewDir, poiMesh.worldPos, albedo); + #endif + + #ifdef DISTORT + calculateDissolve(albedo, dissolveEmission); + #endif +} + +void distanceFade(inout float4 albedo) +{ + #if defined(PROP_MAINFADETEXTURE) || !defined(OPTIMIZER_ENABLED) + half fadeMap = POI2D_SAMPLER_PAN(_MainFadeTexture, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + half fadeMap = 1; + #endif + if (fadeMap) + { + half fadeValue = max(smoothstep(float4(0,0,0,0).x, float4(0,0,0,0).y, poiCam.distanceToVert), float(0)); + albedo.a *= fadeValue; + } +} +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMainTex.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMainTex.cginc.meta new file mode 100644 index 00000000..b15d25ea --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMainTex.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b75b93b864929094caab65af1322d9f7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMatcap.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMatcap.cginc new file mode 100644 index 00000000..3ec75097 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMatcap.cginc @@ -0,0 +1,160 @@ +#ifndef MATCAP + #define MATCAP + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_Matcap); float4 _Matcap_ST; + #endif + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_MatcapMask); + #endif + float _MatcapMaskInvert; + float _MatcapBorder; + float4 _MatcapColor; + float _MatcapIntensity; + float _MatcapReplace; + float _MatcapMultiply; + float _MatcapAdd; + float _MatcapEnable; + float _MatcapLightMask; + float _MatcapEmissionStrength; + float _MatcapNormal; + float _MatcapHueShiftEnabled; + float _MatcapHueShiftSpeed; + float _MatcapHueShift; + + #ifdef COLOR_GRADING_HDR_3D + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_Matcap2);float4 _Matcap2_ST; + #endif + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_Matcap2Mask); + #endif + float _Matcap2MaskInvert; + float _Matcap2Border; + float4 _Matcap2Color; + float _Matcap2Intensity; + float _Matcap2Replace; + float _Matcap2Multiply; + float _Matcap2Add; + float _Matcap2Enable; + float _Matcap2LightMask; + float _Matcap2EmissionStrength; + float _Matcap2Normal; + float _Matcap2HueShiftEnabled; + float _Matcap2HueShiftSpeed; + float _Matcap2HueShift; + #endif + + void blendMatcap(inout float4 finalColor, float add, float multiply, float replace, float4 matcapColor, float matcapMask, inout float3 matcapEmission, float emissionStrength + #ifdef POI_LIGHTING + , float matcapLightMask + #endif + #ifdef POI_BLACKLIGHT + , uint blackLightMaskIndex + #endif + ) + { + #ifdef POI_LIGHTING + if (matcapLightMask) + { + matcapMask *= lerp(1, poiLight.rampedLightMap, matcapLightMask); + } + #endif + #ifdef POI_BLACKLIGHT + if(blackLightMaskIndex != 4) + { + matcapMask *= blackLightMask[blackLightMaskIndex]; + } + #endif + + finalColor.rgb = lerp(finalColor.rgb, matcapColor.rgb, replace * matcapMask * matcapColor.a * .999999); + finalColor.rgb *= lerp(1, matcapColor.rgb, multiply * matcapMask * matcapColor.a); + finalColor.rgb += matcapColor.rgb * add * matcapMask * matcapColor.a; + matcapEmission += matcapColor.rgb * emissionStrength * matcapMask * matcapColor.a; + } + + void applyMatcap(inout float4 finalColor, inout float3 matcapEmission) + { + float4 matcap = 0; + float matcapMask = 0; + float4 matcap2 = 0; + float matcap2Mask = 0; + + // Both matcaps use the same coordinates + half3 worldViewUp = normalize(half3(0, 1, 0) - poiCam.viewDir * dot(poiCam.viewDir, half3(0, 1, 0))); + half3 worldViewRight = normalize(cross(poiCam.viewDir, worldViewUp)); + + // Matcap 1 + half2 matcapUV = half2(dot(worldViewRight, poiMesh.normals[float(1)]), dot(worldViewUp, poiMesh.normals[float(1)])) * float(0.43) + 0.5; + + #if defined(PROP_MATCAP) || !defined(OPTIMIZER_ENABLED) + matcap = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap, _MainTex, TRANSFORM_TEX(matcapUV, _Matcap)) * float4(1,1,1,1); + #else + matcap = float4(1,1,1,1); + #endif + + matcap.rgb *= float(1); + #if defined(PROP_MATCAPMASK) || !defined(OPTIMIZER_ENABLED) + matcapMask = POI2D_SAMPLER_PAN(_MatcapMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + matcapMask = 1; + #endif + + if (float(0)) + { + matcapMask = 1 - matcapMask; + } + + + if(float(0)) + { + matcap.rgb = hueShift(matcap.rgb, float(0) + _Time.x * float(0)); + } + + blendMatcap(finalColor, float(0), float(0), float(1), matcap, matcapMask, matcapEmission, float(0) + #ifdef POI_LIGHTING + , float(0) + #endif + #ifdef POI_BLACKLIGHT + , float(4) + #endif + ); + + + // Matcap 2 + #ifdef COLOR_GRADING_HDR_3D + half2 matcapUV2 = half2(dot(worldViewRight, poiMesh.normals[float(1)]), dot(worldViewUp, poiMesh.normals[float(1)])) * float(0.43) + 0.5; + #if defined(PROP_MATCAP2) || !defined(OPTIMIZER_ENABLED) + matcap2 = UNITY_SAMPLE_TEX2D_SAMPLER(_Matcap2, _MainTex, TRANSFORM_TEX(matcapUV2, _Matcap2)) * float4(1,1,1,1); + #else + matcap2 = float4(1,1,1,1); + #endif + matcap2.rgb *= float(1); + #if defined(PROP_MATCAP2MASK) || !defined(OPTIMIZER_ENABLED) + matcap2Mask = POI2D_SAMPLER_PAN(_Matcap2Mask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + matcap2Mask = 1; + #endif + if (float(0)) + { + matcap2Mask = 1 - matcap2Mask; + } + + + if(float(0)) + { + matcap2.rgb = hueShift(matcap2.rgb, float(0) + _Time.x * float(0)); + } + + blendMatcap(finalColor, float(0), float(0), float(0), matcap2, matcap2Mask, matcapEmission, float(0) + #ifdef POI_LIGHTING + , float(0) + #endif + #ifdef POI_BLACKLIGHT + , float(4) + #endif + ); + #endif + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMatcap.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMatcap.cginc.meta new file mode 100644 index 00000000..6c593a02 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMatcap.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 987d89bff632c2143b6085eadcc9e750 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMath.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMath.cginc new file mode 100644 index 00000000..e626da6a --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMath.cginc @@ -0,0 +1,100 @@ +/* +MIT License + +Copyright (c) 2019 wraikny + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +VertexTransformShader is dependent on: +*/ + +#ifndef POI_MATH +#define POI_MATH + +#ifndef pi + #define pi float(3.14159265359) +#endif + +float4 quaternion_conjugate(float4 v) +{ + return float4( + v.x, -v.yzw + ); +} + +float4 quaternion_mul(float4 v1, float4 v2) +{ + float4 result1 = (v1.x * v2 + v1 * v2.x); + + float4 result2 = float4( + - dot(v1.yzw, v2.yzw), + cross(v1.yzw, v2.yzw) + ); + + return float4(result1 + result2); +} + +// angle : radians +float4 get_quaternion_from_angle(float3 axis, float angle) +{ + return float4( + cos(angle / 2.0), + normalize(axis) * sin(angle / 2.0) + ); +} + +float4 quaternion_from_vector(float3 inVec) +{ + return float4(0.0, inVec); +} + +float degree_to_radius(float degree) +{ + return( + degree / 180.0 * pi + ); +} + +float3 rotate_with_quaternion(float3 inVec, float3 rotation) +{ + float4 qx = get_quaternion_from_angle(float3(1, 0, 0), degree_to_radius(rotation.x)); + float4 qy = get_quaternion_from_angle(float3(0, 1, 0), degree_to_radius(rotation.y)); + float4 qz = get_quaternion_from_angle(float3(0, 0, 1), degree_to_radius(rotation.z)); + + #define MUL3(A, B, C) quaternion_mul(quaternion_mul((A), (B)), (C)) + float4 quaternion = normalize(MUL3(qx, qy, qz)); + float4 conjugate = quaternion_conjugate(quaternion); + + float4 inVecQ = quaternion_from_vector(inVec); + + float3 rotated = ( + MUL3(quaternion, inVecQ, conjugate) + ).yzw; + + return rotated; +} + +float4 transform(float4 input, float4 pos, float4 rotation, float4 scale) +{ + input.rgb *= (scale.xyz * scale.w); + input = float4(rotate_with_quaternion(input.xyz, rotation.xyz/* * rotation.w*/) + (pos.xyz/* * pos.w*/), input.w); + return input; +} + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMath.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMath.cginc.meta new file mode 100644 index 00000000..544b168d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMath.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9b7c908d525cad74599e6c263309ac24 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMetal.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMetal.cginc new file mode 100644 index 00000000..b3e1cf11 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMetal.cginc @@ -0,0 +1,130 @@ +#ifndef POI_METAL + #define POI_METAL + + samplerCUBE _CubeMap; + float _SampleWorld; + POI_TEXTURE_NOSAMPLER(_MetallicMask); + POI_TEXTURE_NOSAMPLER(_SmoothnessMask); + float _Metallic; + float _InvertSmoothness; + float _Smoothness; + float _EnableMetallic; + float3 _MetalReflectionTint; + POI_TEXTURE_NOSAMPLER(_MetallicTintMap); + + float3 finalreflections; + float metalicMap; + float3 reflection; + float roughness; + float lighty_boy_uwu_var; + + bool shouldMetalHappenBeforeLighting() + { + float4 envSample = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, poiCam.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS); + bool probeExists = !(unity_SpecCube0_HDR.a == 0 && envSample.a == 0); + return probeExists && !float(0); + } + + float3 fresnelRelflection(in float4 albedo) + { + half3 dotNV = 1 - abs(poiLight.nDotV); + half f = dotNV * dotNV * dotNV * dotNV; + //f *= i_sold.fresnel; + return lerp(lerp(DielectricSpec.rgb, albedo.rgb, metalicMap), saturate(1 - roughness + metalicMap), f); + } + + void calculateMetallicness() + { + metalicMap = POI2D_SAMPLER_PAN(_MetallicMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)) * float(0); + } + + void ApplyMetallics(inout float4 finalColor, in float4 albedo) + { + #ifdef FORWARD_BASE_PASS + float smoothnessMap = (POI2D_SAMPLER_PAN(_SmoothnessMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0))); + + #ifdef POI_BLACKLIGHT + if (float(4) != 4) + { + metalicMap *= blackLightMask[float(4)]; + smoothnessMap *= blackLightMask[float(4)]; + } + #endif + + if(float(0) == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= float(0); + roughness = 1 - smoothnessMap; + + + Unity_GlossyEnvironmentData envData; + envData.roughness = roughness; + envData.reflUVW = BoxProjection( + poiCam.reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube0_ProbePosition, + unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax + ); + float3 probe0 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE(unity_SpecCube0), unity_SpecCube0_HDR, envData + ); + envData.reflUVW = BoxProjection( + poiCam.reflectionDir, poiMesh.worldPos.xyz, + unity_SpecCube1_ProbePosition, + unity_SpecCube1_BoxMin, unity_SpecCube1_BoxMax + ); + + float interpolator = unity_SpecCube0_BoxMin.w; + + if(interpolator < 0.99999) + { + float3 probe1 = Unity_GlossyEnvironment( + UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), + unity_SpecCube0_HDR, envData + ); + reflection = lerp(probe1, probe0, interpolator); + } + else + { + reflection = probe0; + } + + float reflecty_lighty_boy_uwu_var_2 = 1.0 / (roughness * roughness + 1.0); + + half4 tintMap = POI2D_SAMPLER_PAN(_MetallicTintMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + finalColor.rgb *= (1 - metalicMap * tintMap.a); + finalColor.rgb += reflecty_lighty_boy_uwu_var_2 * reflection.rgb * fresnelRelflection(albedo) * float4(1,1,1,1) * tintMap.rgb * tintMap.a; + #endif + } + + void ApplyMetallicsFake(inout float4 finalColor, in float4 albedo) + { + #ifdef FORWARD_BASE_PASS + metalicMap = POI2D_SAMPLER_PAN(_MetallicMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)) * float(0); + float smoothnessMap = (POI2D_SAMPLER_PAN(_SmoothnessMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0))); + + #ifdef POI_BLACKLIGHT + if(float(4) != 4) + { + metalicMap *= blackLightMask[float(4)]; + smoothnessMap *= blackLightMask[float(4)]; + } + #endif + + if(float(0) == 1) + { + smoothnessMap = 1 - smoothnessMap; + } + smoothnessMap *= float(0); + roughness = 1 - smoothnessMap; + + reflection = texCUBElod(_CubeMap, float4(poiCam.reflectionDir, roughness * UNITY_SPECCUBE_LOD_STEPS)); + + float reflecty_lighty_boy_uwu_var_2 = 1.0 / (roughness * roughness + 1.0); + half4 tintMap = POI2D_SAMPLER_PAN(_MetallicTintMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + finalColor.rgb *= (1 - metalicMap * tintMap.a); + finalColor.rgb += reflecty_lighty_boy_uwu_var_2 * reflection.rgb * fresnelRelflection(albedo) * float4(1,1,1,1) * tintMap.rgb * tintMap.a; + #endif + } +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMetal.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMetal.cginc.meta new file mode 100644 index 00000000..d0f3dc3e --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMetal.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ac37d54f6206cec4f8252bbae3dba021 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMirror.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMirror.cginc new file mode 100644 index 00000000..3a42160c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMirror.cginc @@ -0,0 +1,81 @@ +#ifndef POI_MIRROR + #define POI_MIRROR + + float _Mirror; + float _EnableMirrorTexture; + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_MirrorTexture); + #endif + + + void applyMirrorRenderVert(inout float4 vertex) + { + + if (float(0) != 0) + { + bool inMirror = IsInMirror(); + if(float(0) == 1 && inMirror) + { + return; + } + if(float(0) == 1 && !inMirror) + { + vertex = -1; + return; + } + if(float(0) == 2 && inMirror) + { + vertex = -1; + return; + } + if(float(0) == 2 && !inMirror) + { + return; + } + } + } + + void applyMirrorRenderFrag() + { + + if(float(0) != 0) + { + bool inMirror = IsInMirror(); + if(float(0) == 1 && inMirror) + { + return; + } + if(float(0) == 1 && !inMirror) + { + clip(-1); + return; + } + if(float(0) == 2 && inMirror) + { + clip(-1); + return; + } + if(float(0) == 2 && !inMirror) + { + return; + } + } + } + + #if(defined(FORWARD_BASE_PASS) || defined(FORWARD_ADD_PASS)) + void applyMirrorTexture(inout float4 mainTexture) + { + + if(float(0)) + { + if(IsInMirror()) + { + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + mainTexture = POI2D_SAMPLER_PAN(_MirrorTexture, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #endif + } + } + } + #endif + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMirror.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMirror.cginc.meta new file mode 100644 index 00000000..dbf64a2f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiMirror.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3c4bb9036a467d4469839994de7133e1 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineFrag.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineFrag.cginc new file mode 100644 index 00000000..62e63c91 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineFrag.cginc @@ -0,0 +1,107 @@ +float _OutlineRimLightBlend; +float _OutlineLit; +float _OutlineTintMix; +float2 _MainTexPan; +float _MainTextureUV; + +float4 frag(v2f i, uint facing: SV_IsFrontFace): COLOR +{ + float4 finalColor = 1; + + if (float(0)) + { + UNITY_SETUP_INSTANCE_ID(i); + + float3 finalEmission = 0; + float4 albedo = 1; + + poiMesh.uv[0] = i.uv0.xy; + poiMesh.uv[1] = i.uv0.zw; + poiMesh.uv[2] = i.uv1.xy; + poiMesh.uv[3] = i.uv1.zw; + + calculateAttenuation(i); + InitializeMeshData(i, facing); + initializeCamera(i); + calculateTangentData(); + + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _MainTex) + _Time.x * float4(0,0,0,0)); + half3 detailMask = 1; + calculateNormals(detailMask); + + #ifdef POI_DATA + calculateLightingData(i); + #endif + #ifdef POI_LIGHTING + calculateBasePassLightMaps(); + #endif + + float3 uselessData0; + float3 uselessData1; + initTextureData(albedo, mainTexture, uselessData0, uselessData1, detailMask); + + + fixed4 col = mainTexture; + float alphaMultiplier = smoothstep(float4(0,0,0,0).x, float4(0,0,0,0).y, distance(getCameraPosition(), i.worldPos)); + float OutlineMask = tex2D(_OutlineMask, TRANSFORM_TEX(poiMesh.uv[float(0)], _OutlineMask) + _Time.x * float4(0,0,0,0)).r; + clip(OutlineMask * float(0) - 0.001); + + col = col * 0.00000000001 + tex2D(_OutlineTexture, TRANSFORM_TEX(poiMesh.uv[float(0)], _OutlineTexture) + _Time.x * float4(0,0,0,0) ); + col.a *= albedo.a; + col.a *= alphaMultiplier; + + #ifdef POI_RANDOM + col.a *= i.angleAlpha; + #endif + + poiCam.screenUV = calcScreenUVs(i.grabPos); + col.a *= float4(1,1,1,1).a; + + + if(float(0) == 1) + { + applyDithering(col); + } + + clip(col.a - float(0.5)); + + #ifdef POI_MIRROR + applyMirrorRenderFrag(); + #endif + + + if(float(0) == 1) + { + #ifdef POI_MIRROR + applyMirrorTexture(mainTexture); + #endif + col.rgb = mainTexture.rgb; + } + else if(float(0) == 2) + { + col.rgb = lerp(col.rgb, poiLight.color, float(0)); + } + col.rgb *= float4(1,1,1,1).rgb; + + if(float(0) == 1) + { + col.rgb = lerp(col.rgb, mainTexture.rgb, float(0)); + } + + finalColor = col; + + #ifdef POI_LIGHTING + + if(float(1)) + { + finalColor.rgb *= calculateFinalLighting(finalColor.rgb, finalColor); + } + #endif + finalColor.rgb += (col.rgb * float(0)); + } + else + { + clip(-1); + } + return finalColor; +} diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineFrag.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineFrag.cginc.meta new file mode 100644 index 00000000..49954534 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c26a1c21cd1187445a91b29f7e686012 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineVert.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineVert.cginc new file mode 100644 index 00000000..637ec16d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineVert.cginc @@ -0,0 +1,115 @@ +#ifndef OutlineVert + #define OutlineVert + + #include "CGI_PoiV2F.cginc" + + float _OutlineMode; + float4 _OutlinePersonaDirection; + float4 _OutlineDropShadowOffset; + float _OutlineUseVertexColors; + float _OutlineFixedSize; + float _commentIfZero_EnableOutlinePass; + float _OutlinesMaxDistance; + + sampler2D _OutlineMask; float4 _OutlineMask_ST; float2 _OutlineMaskPan; float _OutlineMaskUV; + v2f vert(appdata v) + { + + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + #ifdef RALIV_PENETRATION + applyRalivDynamicOrifaceSystem(v); + #endif + + o.uv0.xy = v.uv0.xy; + o.uv0.zw = v.uv1.xy; + o.uv1.xy = v.uv2.xy; + o.uv1.zw = v.uv3.xy; + + float2 uvArray[4]; + uvArray[0] = o.uv0.xy; + uvArray[1] = o.uv0.zw; + uvArray[2] = o.uv1.xy; + uvArray[3] = o.uv1.zw; + + #ifdef POI_MIRROR + applyMirrorRenderVert(v.vertex); + #endif + + o.uv0.xy = v.uv0 + _OutlineGlobalPan.xy * _Time.y; + float outlineMask = 1; + + outlineMask = poiMax(tex2Dlod(_OutlineMask, float4(TRANSFORM_TEX(uvArray[float(0)], _OutlineMask) + _Time.x * float4(0,0,0,0), 0, 0)).rgb); + + if (float(0) == 2) + { + outlineMask *= v.color.r; + } + + + if(float(0) != 1) + { + o.normal = UnityObjectToWorldNormal(v.normal); + } + else + { + o.normal = UnityObjectToWorldNormal(v.color); + } + + float4 localPos = v.vertex; + + #ifdef RALIV_PENETRATION + applyRalivDynamicPenetrationSystem(localPos.rgb, o.normal.rgb, v); + #endif + + half offsetMultiplier = 1; + half distanceOffset = 1; + + if(float(0)) + { + distanceOffset *= min(distance(_WorldSpaceCameraPos, mul(unity_ObjectToWorld, localPos).xyz), float(9999)); + } + + float3 offset = o.normal * (float(0) * float(0) / 100) * outlineMask * distanceOffset; + + + if(float(0) == 2) + { + float3 lightDirection = poiLight.direction = normalize(_WorldSpaceLightPos0 + unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz); + offsetMultiplier = saturate(dot(lightDirection, o.normal)); + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if(float(0) == 3) + { + half3 viewNormal = mul((float3x3)UNITY_MATRIX_V, o.normal); + offsetMultiplier = saturate(dot(viewNormal.xy, normalize(float4(1,0,0,0).xy))); + + offset *= offsetMultiplier; + offset *= distanceOffset; + } + else if(float(0) == 4) + { + offset = mul((float3x3)transpose(UNITY_MATRIX_V), float4(1,0,0,0)); + offset *= distanceOffset; + } + + o.worldPos = mul(unity_ObjectToWorld, localPos) + float4(offset, 0); + o.modelPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)); + o.pos = UnityWorldToClipPos(o.worldPos); + o.grabPos = ComputeGrabScreenPos(o.pos); + o.angleAlpha = 1; + #ifdef POI_RANDOM + o.angleAlpha = ApplyAngleBasedRendering(o.modelPos, o.worldPos); + #endif + + UNITY_TRANSFER_SHADOW(o, o.uv0); + UNITY_TRANSFER_FOG(o, o.pos); + return o; + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineVert.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineVert.cginc.meta new file mode 100644 index 00000000..b3bb5aff --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiOutlineVert.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b7c452a7352a2044e8e6af9404158f61 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPanosphere.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPanosphere.cginc new file mode 100644 index 00000000..eca50756 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPanosphere.cginc @@ -0,0 +1,81 @@ +#ifndef PANOSPHERE + #define PANOSPHERE + + float _PanoEmission; + float _PanoBlend; + float4 _PanosphereColor; + float3 _PanospherePan; + float _PanoToggle; + float _PanoCubeMapToggle; + float _PanoInfiniteStereoToggle; + + float3 panoColor; + float panoMask; + + #if defined(PROP_PANOSPHERETEXTURE) || !defined(OPTIMIZER_ENABLED) + sampler2D _PanosphereTexture; float4 _PanosphereTexture_ST; + #endif + #if defined(PROP_PANOCUBEMAP) || !defined(OPTIMIZER_ENABLED) + samplerCUBE _PanoCubeMap; half4 _PanoCubeMap_HDR; + #endif + #if defined(PROP_PANOMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_PanoMask); + #endif + + float2 projectIt(float3 coords) + { + float3 normalizedCoords = normalize(coords); + float latitude = acos(normalizedCoords.y); + float longitude = atan2(normalizedCoords.z, normalizedCoords.x); + float2 sphereCoords = float2(longitude + _Time.y * float4(0,0,0,0).x, latitude + _Time.y * float4(0,0,0,0).y) * float2(1.0 / UNITY_PI, 1.0 / UNITY_PI); + sphereCoords = float2(1.0, 1.0) - sphereCoords; + return(sphereCoords + float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).xy) * float4(0, 1 - unity_StereoEyeIndex, 1, 1.0).zw; + } + + void applyPanosphereColor(inout float4 albedo, inout float3 panosphereEmission) + { + #if defined(PROP_PANOMASK) || !defined(OPTIMIZER_ENABLED) + panoMask = POI2D_SAMPLER_PAN(_PanoMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + panoMask = 1; + #endif + #ifdef POI_BLACKLIGHT + if (float(4) != 4) + { + panoMask *= blackLightMask[float(4)]; + } + #endif + + + if(float(0)) + { + #if defined(PROP_PANOCUBEMAP) || !defined(OPTIMIZER_ENABLED) + float3 cubeUV = mul(poiRotationMatrixFromAngles(float4(0,0,0,0).xyz * _Time.y), float4(-poiCam.viewDir, 1)); + half4 cubemap = texCUBE(_PanoCubeMap, cubeUV); + panoColor = DecodeHDR(cubemap, _PanoCubeMap_HDR) * float4(1,1,1,1).rgb; + #else + panoColor = float4(1,1,1,1).rgb; + #endif + } + else + { + float2 uv = projectIt(normalize(lerp(getCameraPosition().xyz, poiCam.worldPos.xyz, float(0)) - poiMesh.worldPos.xyz) * - 1); + + float2 ddxuv = ddx(uv); + float2 ddyuv = ddy(uv); + if(any(fwidth(uv) > .5)) + { + ddxuv = ddyuv = 0.001; + } + #if defined(PROP_PANOSPHERETEXTURE) || !defined(OPTIMIZER_ENABLED) + panoColor = tex2D(_PanosphereTexture, TRANSFORM_TEX(uv, _PanosphereTexture), ddxuv, ddyuv).rgb * float4(1,1,1,1).rgb; + #else + panoColor = float4(1,1,1,1).rgb; + #endif + } + panosphereEmission = panoColor * float(0) * panoMask * float(0); + albedo.rgb = lerp(albedo.rgb, panoColor, float(0) * .9999999 * panoMask); + } + +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPanosphere.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPanosphere.cginc.meta new file mode 100644 index 00000000..2d87feaa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPanosphere.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a93ec39e7ba25f148af470fefd50b3fa +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiParallax.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiParallax.cginc new file mode 100644 index 00000000..a533210c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiParallax.cginc @@ -0,0 +1,166 @@ +#ifndef POI_PARALLAX + #define POI_PARALLAX + + #if defined(PROP_PARALLAXHEIGHTMAP) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_ParallaxHeightMap); float4 _ParallaxHeightMap_ST; + #endif + #if defined(PROP_PARALLAXHEIGHTMAPMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_ParallaxHeightMapMask); + #endif + float2 _ParallaxHeightMapPan; + float _ParallaxStrength; + float _ParallaxHeightMapEnabled; + float _ParallaxUV; + + //Internal + float _ParallaxInternalMapEnabled; + #if defined(PROP_PARALLAXINTERNALMAP) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_ParallaxInternalMap); float4 _ParallaxInternalMap_ST; + #endif + #if defined(PROP_PARALLAXINTERNALMAPMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_ParallaxInternalMapMask); + #endif + float _ParallaxInternalIterations; + float _ParallaxInternalMinDepth; + float _ParallaxInternalMaxDepth; + float _ParallaxInternalMinFade; + float _ParallaxInternalMaxFade; + float4 _ParallaxInternalMinColor; + float4 _ParallaxInternalMaxColor; + float4 _ParallaxInternalPanSpeed; + float4 _ParallaxInternalPanDepthSpeed; + float _ParallaxInternalHeightmapMode; + float _ParallaxInternalHeightFromAlpha; + + float GetParallaxHeight(float2 uv) + { + #if defined(PROP_PARALLAXHEIGHTMAP) || !defined(OPTIMIZER_ENABLED) + return clamp(UNITY_SAMPLE_TEX2D_SAMPLER(_ParallaxHeightMap, _MainTex, TRANSFORM_TEX(uv, _ParallaxHeightMap) + _Time.x * float4(0,0,0,0)).g, 0, .99999); + #else + return 0; + #endif + } + /* + float2 ParallaxOffset(float2 viewDir) + { + float height = GetParallaxHeight(); + height -= 0.5; + height *= float(0); + return viewDir * height; + } + */ + float2 ParallaxRaymarching(float2 viewDir) + { + float2 uvOffset = 0; + float stepSize = 0.1; + float2 uvDelta = viewDir * (stepSize * float(0)); + + float stepHeight = 1; + float surfaceHeight = GetParallaxHeight(poiMesh.uv[float(0)]); + + + float2 prevUVOffset = uvOffset; + float prevStepHeight = stepHeight; + float prevSurfaceHeight = surfaceHeight; + + for (int i = 1; i < 10 && stepHeight > surfaceHeight; i ++) + { + prevUVOffset = uvOffset; + prevStepHeight = stepHeight; + prevSurfaceHeight = surfaceHeight; + + uvOffset -= uvDelta; + stepHeight -= stepSize; + surfaceHeight = GetParallaxHeight(poiMesh.uv[float(0)] + uvOffset); + } + + float prevDifference = prevStepHeight - prevSurfaceHeight; + float difference = surfaceHeight - stepHeight; + float t = prevDifference / (prevDifference + difference); + uvOffset = prevUVOffset -uvDelta * t; + #if defined(PROP_PARALLAXHEIGHTMAPMASK) || !defined(OPTIMIZER_ENABLED) + return uvOffset *= POI2D_SAMPLER_PAN(_ParallaxHeightMapMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + return uvOffset; + #endif + } + + void calculateandApplyParallax() + { + + if (float(0)) + { + float2 parallaxOffset = ParallaxRaymarching(poiCam.tangentViewDir.xy); + + if(float(0) == 0) + { + poiMesh.uv[0] += parallaxOffset; + } + + if(float(0) == 1) + { + poiMesh.uv[1] += parallaxOffset; + } + + if(float(0) == 2) + { + poiMesh.uv[2] += parallaxOffset; + } + + if(float(0) == 3) + { + poiMesh.uv[3] += parallaxOffset; + } + } + } + + void calculateAndApplyInternalParallax(inout float4 finalColor) + { + #if defined(_PARALLAXMAP) + + if(float(0)) + { + float3 parallax = 0; + + for (int j = float(1); j > 0; j --) + { + float ratio = (float)j / float(1); + float2 parallaxOffset = _Time.y * (float4(0,0,0,0) + (1 - ratio) * float4(0,0,0,0)); + float fade = lerp(float(0), float(1), ratio); + #if defined(PROP_PARALLAXINTERNALMAP) || !defined(OPTIMIZER_ENABLED) + float4 parallaxColor = UNITY_SAMPLE_TEX2D_SAMPLER(_ParallaxInternalMap, _MainTex, TRANSFORM_TEX(poiMesh.uv[0], _ParallaxInternalMap) + lerp(float(0), float(1), ratio) * - poiCam.tangentViewDir.xy + parallaxOffset); + #else + float4 parallaxColor = 0; + #endif + float3 parallaxTint = lerp(float4(1,1,1,1), float4(1,1,1,1), ratio); + float parallaxHeight; + if(float(0)) + { + parallaxTint *= parallaxColor.rgb; + parallaxHeight = parallaxColor.a; + } + else + { + parallaxHeight = parallaxColor.r; + } + //float parallaxColor *= lerp(float4(1,1,1,1), float4(1,1,1,1), 1 - ratio); + + if (float(0) == 1) + { + parallax = lerp(parallax, parallaxTint * fade, parallaxHeight >= 1 - ratio); + } + else + { + parallax += parallaxTint * parallaxHeight * fade; + } + } + //parallax /= float(1); + #if defined(PROP_PARALLAXINTERNALMAPMASK) || !defined(OPTIMIZER_ENABLED) + finalColor.rgb += parallax * POI2D_SAMPLER_PAN(_ParallaxInternalMapMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + finalColor.rgb += parallax; + #endif + } + #endif + } +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiParallax.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiParallax.cginc.meta new file mode 100644 index 00000000..2b602b3f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiParallax.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 639199df5a9a78c47b5344be250899a7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPass.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPass.cginc new file mode 100644 index 00000000..eb52e4d6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPass.cginc @@ -0,0 +1,248 @@ +/* +USED--------------------------------------------- +"_PARALLAXMAP" +"_REQUIRE_UV2" +"_SUNDISK_NONE" +"_DETAIL_MULX2" +"_GLOSSYREFLECTIONS_OFF" +"_METALLICGLOSSMAP" +"_COLORADDSUBDIFF_ON" +"_SPECGLOSSMAP" +"_TERRAIN_NORMAL_MAP" +"_SUNDISK_SIMPLE" +"_EMISSION" +"_COLORCOLOR_ON" +"_COLOROVERLAY_ON" +"_ALPHAMODULATE_ON" +"_SUNDISK_HIGH_QUALITY" +"_MAPPING_6_FRAMES_LAYOUT" +"_NORMALMAP +"EFFECT_BUMP" +"BLOOM" +"BLOOM_LOW" +"GRAIN" +"DEPTH_OF_FIELD" +"USER_LUT" +"CHROMATIC_ABERRATION_LOW" +"BLOOM_LENS_DIRT" +"_FADING_ON" +"CHROMATIC_ABERRATION" +"DISTORT" +"GEOM_TYPE_BRANCH" +"_SPECULARHIGHLIGHTS_OFF" +"_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A" +"EFFECT_HUE_VARIATION" +"GEOM_TYPE_LEAF" +"GEOM_TYPE_MESH" +"FINALPASS" +"AUTO_EXPOSURE +"VIGNETTE" +"VIGNETTE_MASKED" +"COLOR_GRADING_HDR" +"COLOR_GRADING_HDR_3D" +"DITHERING" +"VIGNETTE_CLASSIC" +"GEOM_TYPE_BRANCH_DETAIL" +"GEOM_TYPE_FROND" +"DEPTH_OF_FIELD_COC_VIEW" +"COLOR_GRADING_LOG_VIEW" + +UNUSED------------------------------------------- +"_ALPHABLEND_ON" +"_ALPHAPREMULTIPLY_ON" +"_ALPHATEST_ON" +"PIXELSNAP_ON" +"TONEMAPPING_FILMIC" +"TONEMAPPING_NEUTRAL" +"TONEMAPPING_ACES" +"TONEMAPPING_CUSTOM" +"COLOR_GRADING" + +DO NOT USE ----------------------------------------- +"BILLBOARD_FACE_CAMERA_POS" +SOFTPARTICLES_ON +*/ + + +#ifndef POI_PASS +#define POI_PASS + +#include "UnityCG.cginc" +#include "Lighting.cginc" +#include "UnityPBSLighting.cginc" +#include "AutoLight.cginc" +#include "UnityShaderVariables.cginc" + +#ifdef POI_META_PASS + #include "UnityMetaPass.cginc" +#endif + +//#pragma warning (default : 3206) // implicit truncation + +#include "CGI_PoiMacros.cginc" +#include "CGI_PoiDefines.cginc" +#include "CGI_FunctionsArtistic.cginc" + +#include "CGI_Poicludes.cginc" +#include "CGI_PoiHelpers.cginc" +#include "CGI_PoiBlending.cginc" + +#ifdef _SUNDISK_NONE + #include "CGI_PoiRandom.cginc" +#endif + +#ifdef _REQUIRE_UV2 + #include "CGI_PoiMirror.cginc" +#endif + +#include "CGI_PoiPenetration.cginc" +#include "CGI_PoiVertexManipulations.cginc" + +#include "CGI_PoiSpawnInVert.cginc" + +#include "CGI_PoiV2F.cginc" + +#ifdef BLOOM_LOW + #include "CGI_PoiBulge.cginc" +#endif + +#include "CGI_PoiVert.cginc" + +#ifdef TESSELATION + #include "CGI_PoiTessellation.cginc" +#endif + +#include "CGI_PoiDithering.cginc" + +#ifdef _PARALLAXMAP + #include "CGI_PoiParallax.cginc" +#endif + +#ifdef USER_LUT + #include "CGI_PoiUVDistortion.cginc" +#endif + +#ifdef VIGNETTE + #include "CGI_PoiRGBMask.cginc" +#endif + +#ifdef COLOR_GRADING_LOG_VIEW + #include "CGI_PoiAudioLink.cginc" +#endif + +#include "CGI_PoiData.cginc" + +#ifdef _SPECULARHIGHLIGHTS_OFF + #include "CGI_PoiBlackLight.cginc" +#endif + +#include "CGI_PoiSpawnInFrag.cginc" + +#ifdef WIREFRAME + #include "CGI_PoiWireframe.cginc" +#endif + +#ifdef DISTORT + #include "CGI_PoiDissolve.cginc" +#endif + +#ifdef DEPTH_OF_FIELD + #include "CGI_PoiHologram.cginc" +#endif + +#ifdef BLOOM_LENS_DIRT + #include "CGI_PoiIridescence.cginc" +#endif + + +#ifdef FUR + //#include "CGI_PoiFur.cginc" + //#include "CGI_PoiGeomFur.cginc" +#endif + +#ifdef VIGNETTE_MASKED + #include "CGI_PoiLighting.cginc" +#endif + +#include "CGI_PoiMainTex.cginc" + +#ifdef GEOM_TYPE_BRANCH + #include "CGI_PoiDecal.cginc" +#endif + +#ifdef CHROMATIC_ABERRATION + #include "CGI_PoiVoronoi.cginc" +#endif + +#ifdef _DETAIL_MULX2 + #include "CGI_PoiPanosphere.cginc" +#endif + +#ifdef EFFECT_BUMP + #include "CGI_PoiMSDF.cginc" +#endif + +#ifdef GRAIN + #include "CGI_PoiDepthColor.cginc" +#endif + + +#ifdef _SUNDISK_HIGH_QUALITY + #include "CGI_PoiFlipbook.cginc" +#endif + +#ifdef _GLOSSYREFLECTIONS_OFF + #include "CGI_PoiRimLighting.cginc" +#endif + +#ifdef _MAPPING_6_FRAMES_LAYOUT + #include "CGI_PoiEnvironmentalRimLighting.cginc" +#endif + +#ifdef VIGNETTE_CLASSIC + #include "CGI_PoiBRDF.cginc" +#endif + +#ifdef _METALLICGLOSSMAP + #include "CGI_PoiMetal.cginc" +#endif + +#ifdef _COLORADDSUBDIFF_ON + #include "CGI_PoiMatcap.cginc" +#endif + +#ifdef _SPECGLOSSMAP + #include "CGI_PoiSpecular.cginc" +#endif + +#ifdef BLOOM + #include "CGI_PoiVideo.cginc" +#endif + +#ifdef _TERRAIN_NORMAL_MAP + #include "CGI_PoiSubsurfaceScattering.cginc" +#endif + +#include "CGI_PoiBlending.cginc" +#include "CGI_PoiGrab.cginc" + +#ifdef _SUNDISK_SIMPLE + #include "CGI_PoiGlitter.cginc" +#endif + +#ifdef _EMISSION + #include "CGI_PoiEmission.cginc" +#endif + +#ifdef _COLORCOLOR_ON + #include "CGI_PoiClearCoat.cginc" +#endif + +#include "CGI_PoiAlphaToCoverage.cginc" + +#ifdef _COLOROVERLAY_ON + #include "CGI_PoiDebug.cginc" +#endif +#include "CGI_PoiFrag.cginc" + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPass.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPass.cginc.meta new file mode 100644 index 00000000..83ddca51 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPass.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 01700ee9de6a7c64fb2fdd53453d9b4f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassOutline.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassOutline.cginc new file mode 100644 index 00000000..4fa298f3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassOutline.cginc @@ -0,0 +1,30 @@ +#ifndef POI_PASS_OUTLINE + #define POI_PASS_OUTLINE + + #include "UnityCG.cginc" + #include "Lighting.cginc" + #include "UnityPBSLighting.cginc" + #include "AutoLight.cginc" + #include "CGI_PoiMacros.cginc" + #include "CGI_PoiDefines.cginc" + #include "CGI_FunctionsArtistic.cginc" + #include "CGI_Poicludes.cginc" + #include "CGI_PoiHelpers.cginc" + #include "CGI_PoiBlending.cginc" + #include "CGI_PoiPenetration.cginc" + #include "CGI_PoiOutlineVert.cginc" + #ifdef TESSELATION + #include "CGI_PoiTessellation.cginc" + #endif + #ifdef _REQUIRE_UV2 + #include "CGI_PoiMirror.cginc" + #endif + #ifdef DISTORT + #include "CGI_PoiDissolve.cginc" + #endif + #include "CGI_PoiLighting.cginc" + #include "CGI_PoiMainTex.cginc" + #include "CGI_PoiData.cginc" + #include "CGI_PoiDithering.cginc" + #include "CGI_PoiOutlineFrag.cginc" +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassOutline.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassOutline.cginc.meta new file mode 100644 index 00000000..f11a6ace --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassOutline.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 654767c5cf95f594fa2c26f78ae7a1c9 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassShadow.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassShadow.cginc new file mode 100644 index 00000000..3748a40c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassShadow.cginc @@ -0,0 +1,46 @@ +#ifndef POI_PASS_SHADOW + #define POI_PASS_SHADOW + + #pragma multi_compile_shadowcaster + #include "UnityCG.cginc" + #include "UnityShaderVariables.cginc" + #include "UnityCG.cginc" + #include "Lighting.cginc" + #include "UnityPBSLighting.cginc" + #include "AutoLight.cginc" + + #include "CGI_PoiMacros.cginc" + #include "CGI_PoiDefines.cginc" + + #include "CGI_Poicludes.cginc" + #include "CGI_PoiShadowIncludes.cginc" + #include "CGI_PoiHelpers.cginc" + #include "CGI_PoiMirror.cginc" + #include "CGI_PoiSpawnInFrag.cginc" + + #include "CGI_PoiV2F.cginc" + #include "CGI_PoiData.cginc" + + #ifdef WIREFRAME + #include "CGI_PoiWireframe.cginc" + #endif + + #ifdef _SUNDISK_HIGH_QUALITY + #include "CGI_PoiFlipbook.cginc" + #endif + + #ifdef _SUNDISK_NONE + #include "CGI_PoiRandom.cginc" + #endif + #include "CGI_PoiDithering.cginc" + #ifdef DISTORT + #include "CGI_PoiDissolve.cginc" + #endif + #include "CGI_PoiPenetration.cginc" + #include "CGI_PoiVertexManipulations.cginc" + + #include "CGI_PoiSpawnInVert.cginc" + #include "CGI_PoiShadowVert.cginc" + #include "CGI_PoiShadowFrag.cginc" + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassShadow.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassShadow.cginc.meta new file mode 100644 index 00000000..8c1e85b6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPassShadow.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9bcf5e45e7e774140b573e90cadb7780 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPenetration.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPenetration.cginc new file mode 100644 index 00000000..89abf0d3 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPenetration.cginc @@ -0,0 +1,210 @@ +#ifndef RALIV_PENETRATION + #define RALIV_PENETRATION + + float _PenetratorEnabled; + float _squeeze; + float _SqueezeDist; + float _BulgeOffset; + float _BulgePower; + float _Length; + float _EntranceStiffness; + float _Curvature; + float _ReCurvature; + float _WriggleSpeed; + float _Wriggle; + float _OrificeChannel; + float __dirty; + + float _OrifaceEnabled; + sampler2D _OrificeData; + float _EntryOpenDuration; + float _Shape1Depth; + float _Shape1Duration; + float _Shape2Depth; + float _Shape2Duration; + float _Shape3Depth; + float _Shape3Duration; + float _BlendshapePower; + float _BlendshapeBadScaleFix; + + 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 POI_SHADOW + void applyRalivDynamicPenetrationSystem(inout float3 VertexPosition, inout float3 VertexNormal, inout VertexInputShadow v) + #else + void applyRalivDynamicPenetrationSystem(inout float3 VertexPosition, inout float3 VertexNormal, inout appdata v) + #endif + { + + if(float(1)) + { + float orificeType = 0; + float3 orificePositionTracker = float3(0, 0, 100); + float3 orificeNormalTracker = float3(0, 0, 99); + float3 penetratorPositionTracker = float3(0, 0, 1); + float pl = 0; + GetBestLights(float(0), orificeType, orificePositionTracker, orificeNormalTracker, penetratorPositionTracker, pl); + float3 orificeNormal = normalize(lerp((orificePositionTracker - orificeNormalTracker), orificePositionTracker, max(float(0.01), 0.01))); + float3 PhysicsNormal = normalize(penetratorPositionTracker.xyz) * float(0.12) * 0.3; + float wriggleTime = _Time.y * float(6.2); + float temp_output_257_0 = (float(0.12) * ((cos(wriggleTime) * float(0)) + float(0.324))); + float wiggleTime = _Time.y * (float(6.2) * 0.39); + float distanceToOrifice = length(orificePositionTracker); + float enterFactor = smoothstep((float(0.12) + - 0.05), float(0.12), distanceToOrifice); + float3 finalOrificeNormal = normalize(lerp(orificeNormal, (PhysicsNormal + ((float3(0, 1, 0) * (temp_output_257_0 + (float(0.12) * (float(-0.145) + ((sin(wriggleTime) * 0.3) * float(0))) * 2.0))) + (float3(0.5, 0, 0) * (cos(wiggleTime) * float(0))))), enterFactor)); + float smoothstepResult186 = smoothstep(float(0.12), (float(0.12) + 0.05), distanceToOrifice); + float3 finalOrificePosition = lerp(orificePositionTracker, ((normalize(penetratorPositionTracker) * float(0.12)) + (float3(0, 0.2, 0) * (sin((wriggleTime + UNITY_PI)) * float(0)) * float(0.12)) + (float3(0.2, 0, 0) * float(0.12) * (sin((wiggleTime + UNITY_PI)) * float(0)))), smoothstepResult186); + float finalOrificeDistance = length(finalOrificePosition); + float3 bezierBasePosition = float3(0, 0, 0); + float temp_output_59_0 = (finalOrificeDistance / 3.0); + float3 lerpResult274 = lerp(float3(0, 0, 0), (float3(0, 1, 0) * (temp_output_257_0 * - 0.2)), saturate((distanceToOrifice / float(0.12)))); + float3 temp_output_267_0 = ((temp_output_59_0 * float3(0, 0, 1)) + lerpResult274); + float3 bezierBaseNormal = temp_output_267_0; + float3 temp_output_63_0 = (finalOrificePosition - (temp_output_59_0 * finalOrificeNormal)); + float3 bezierOrificeNormal = temp_output_63_0; + float3 bezierOrificePosition = finalOrificePosition; + float vertexBaseTipPosition = (v.vertex.z / finalOrificeDistance); + 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, v.vertex.z)); + float baseFactor = smoothstep(0.05, -0.05, v.vertex.z); + bezierPoint = lerp(bezierPoint, straightLine, baseFactor); + bezierPoint = lerp(((finalOrificeNormal * (v.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 = ((v.vertex.y * bezierSpaceY) + (v.vertex.x * - bezierSpaceX)); + float3 bezierSpaceVertexOffsetNormal = normalize(bezierSpaceVertexOffset); + float distanceFromTip = (finalOrificeDistance - v.vertex.z); + float squeezeFactor = smoothstep(0.0, float(0.0259), -distanceFromTip); + squeezeFactor = max(squeezeFactor, smoothstep(0.0, float(0.0259), distanceFromTip)); + float3 bezierSpaceVertexOffsetSqueezed = lerp((bezierSpaceVertexOffsetNormal * min(length(bezierSpaceVertexOffset), float(0.032))), bezierSpaceVertexOffset, squeezeFactor); + float bulgeFactor = smoothstep(0.0, float(0.158), abs((finalOrificeDistance - v.vertex.z))); + float bulgeFactorBaseClip = smoothstep(0.0, 0.05, v.vertex.z); + float bezierSpaceVertexOffsetBulged = lerp(1.0, (1.0 + float(0.00127)), ((1.0 - bulgeFactor) * 100.0 * bulgeFactorBaseClip)); + float3 bezierSpaceVertexOffsetFinal = lerp((bezierSpaceVertexOffsetSqueezed * bezierSpaceVertexOffsetBulged), bezierSpaceVertexOffset, enterFactor); + float3 bezierConstructedVertex = (bezierPoint + bezierSpaceVertexOffsetFinal); + float3 sphereifyDistance = (bezierConstructedVertex - finalOrificePosition); + float3 sphereifyNormal = normalize(sphereifyDistance); + float sphereifyFactor = smoothstep(0.05, -0.05, distanceFromTip); + float killSphereifyForRing = lerp(sphereifyFactor, 0.0, orificeType); + bezierConstructedVertex = lerp(bezierConstructedVertex, ((min(length(sphereifyDistance), float(0.032)) * sphereifyNormal) + finalOrificePosition), killSphereifyForRing); + float3 ase_worldPos = mul(unity_ObjectToWorld, v.vertex); + float3 ase_worldViewDir = normalize(UnityWorldSpaceViewDir(ase_worldPos)); + bezierConstructedVertex = lerp(bezierConstructedVertex, (-ase_worldViewDir * float3(10000, 10000, 10000)), _WorldSpaceLightPos0.w); + //v.normal = normalize( ( ( -bezierSpaceX * v.normal.x ) + ( bezierSpaceY * v.normal.y ) + ( bezierDerivitive * v.normal.z ) ) ); + //v.vertex.xyz = bezierConstructedVertex; + //v.vertex.w = 1; + VertexPosition = bezierConstructedVertex; + v.vertex.w = 1; + VertexNormal = normalize(((-bezierSpaceX * VertexNormal.x) + (bezierSpaceY * VertexNormal.y) + (bezierDerivitive * VertexNormal.z))); + } + } + + 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) * float(1) * float(1)); + return((blendOffset.x * normal) + (blendOffset.y * tangent) + (blendOffset.z * binormal)); + } + + #ifdef POI_SHADOW + void applyRalivDynamicOrifaceSystem(inout VertexInputShadow v) + #else + void applyRalivDynamicOrifaceSystem(inout appdata v) + #endif + { + + if (float(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(float(0), orificeType, orificePositionTracker, orificeNormalTracker, penetratorPositionTracker, penetratorLength); + penetratorDistance = distance(orificePositionTracker, penetratorPositionTracker); + + float penetrationDepth = (penetratorLength - penetratorDistance); + + float3 normal = normalize(v.normal); + float3 tangent = normalize(v.tangent.xyz); + float3 binormal = normalize(cross(normal, tangent)); + + v.vertex.xyz += getBlendOffset(0, 0, float(0.1), v.vertexId, penetrationDepth, normal, tangent, binormal); + v.vertex.xyz += getBlendOffset(2, float(0.1), float(0.1), v.vertexId, penetrationDepth, normal, tangent, binormal); + v.vertex.xyz += getBlendOffset(4, float(0.2), float(0.1), v.vertexId, penetrationDepth, normal, tangent, binormal); + v.vertex.xyz += getBlendOffset(6, float(0.3), float(0.1), v.vertexId, penetrationDepth, normal, tangent, binormal); + v.vertex.w = 1; + + v.normal += getBlendOffset(1, 0, float(0.1), v.vertexId, penetrationDepth, normal, tangent, binormal); + v.normal += getBlendOffset(3, float(0.1), float(0.1), v.vertexId, penetrationDepth, normal, tangent, binormal); + v.normal += getBlendOffset(5, float(0.2), float(0.1), v.vertexId, penetrationDepth, normal, tangent, binormal); + v.normal += getBlendOffset(7, float(0.3), float(0.1), v.vertexId, penetrationDepth, normal, tangent, binormal); + v.normal = normalize(v.normal); + } + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPenetration.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPenetration.cginc.meta new file mode 100644 index 00000000..be1100a4 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiPenetration.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5e5cdee058013674ab4356c7b1014802 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRGBMask.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRGBMask.cginc new file mode 100644 index 00000000..d2cba777 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRGBMask.cginc @@ -0,0 +1,168 @@ +#ifndef POI_RGBMASK + #define POI_RGBMASK + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_RGBMask); float4 _RGBMask_ST; + #endif + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_RedTexure); float4 _RedTexure_ST; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_GreenTexture); float4 _GreenTexture_ST; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_BlueTexture); float4 _BlueTexture_ST; + #endif + + #ifdef GEOM_TYPE_MESH + #if defined(PROP_RGBNORMALR) || !defined(OPTIMIZER_ENABLED) + #endif + #if defined(PROP_RGBNORMALG) || !defined(OPTIMIZER_ENABLED) + #endif + #if defined(PROP_RGBNORMALB) || !defined(OPTIMIZER_ENABLED) + #endif + POI_NORMAL_NOSAMPLER(_RgbNormalR); + POI_NORMAL_NOSAMPLER(_RgbNormalG); + POI_NORMAL_NOSAMPLER(_RgbNormalB); + float _RgbNormalsEnabled; + #endif + + float4 _RedColor; + float4 _GreenColor; + float4 _BlueColor; + + float2 _RGBMaskPanning; + float2 _RGBRedPanning; + float2 _RGBGreenPanning; + float2 _RGBBluePanning; + + float _RGBBlendMultiplicative; + + float _RGBMaskUV; + float _RGBRed_UV; + float _RGBGreen_UV; + float _RGBBlue_UV; + float _RGBUseVertexColors; + float _RGBNormalBlend; + + static float3 rgbMask; + + void calculateRGBNormals(inout half3 mainTangentSpaceNormal) + { + #ifdef GEOM_TYPE_MESH + #ifndef RGB_MASK_TEXTURE + #define RGB_MASK_TEXTURE + + if (float(0)) + { + rgbMask = poiMesh.vertexColor.rgb; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).rgb; + #else + rgbMask = 1; + #endif + } + #endif + + + if(float(0)) + { + + if(float(0) == 0) + { + + if(float(0) > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(0)); + mainTangentSpaceNormal = lerp(mainTangentSpaceNormal, normalToBlendWith, rgbMask.r); + } + + + if(float(0) > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(0)); + mainTangentSpaceNormal = lerp(mainTangentSpaceNormal, normalToBlendWith, rgbMask.g); + } + + + if(float(0) > 0) + { + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(0)); + mainTangentSpaceNormal = lerp(mainTangentSpaceNormal, normalToBlendWith, rgbMask.b); + } + + return; + } + else + { + half3 newNormal = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalR, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(0) * rgbMask.r); + half3 normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalG, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(0) * rgbMask.g); + newNormal = BlendNormals(newNormal, normalToBlendWith); + normalToBlendWith = UnpackScaleNormal(POI2D_SAMPLER_PAN(_RgbNormalB, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)), float(0) * rgbMask.b); + newNormal = BlendNormals(newNormal, normalToBlendWith); + mainTangentSpaceNormal = BlendNormals(newNormal, mainTangentSpaceNormal); + return; + } + } + #endif + } + + float3 calculateRGBMask(float3 baseColor) + { + //If RGB normals are in use this data will already exist + #ifndef RGB_MASK_TEXTURE + #define RGB_MASK_TEXTURE + + + if (float(0)) + { + rgbMask = poiMesh.vertexColor.rgb; + } + else + { + #if defined(PROP_RGBMASK) || !defined(OPTIMIZER_ENABLED) + rgbMask = POI2D_SAMPLER_PAN(_RGBMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).rgb; + #else + rgbMask = 1; + #endif + } + #endif + #if defined(PROP_REDTEXURE) || !defined(OPTIMIZER_ENABLED) + float4 red = POI2D_SAMPLER_PAN(_RedTexure, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 red = 1; + #endif + #if defined(PROP_GREENTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 green = POI2D_SAMPLER_PAN(_GreenTexture, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 green = 1; + #endif + #if defined(PROP_BLUETEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 blue = POI2D_SAMPLER_PAN(_BlueTexture, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float4 blue = 1; + #endif + + + if(float(0)) + { + float3 RGBColor = 1; + RGBColor = lerp(RGBColor, red.rgb * float4(1,1,1,1).rgb, rgbMask.r * red.a * float4(1,1,1,1).a); + RGBColor = lerp(RGBColor, green.rgb * float4(1,1,1,1).rgb, rgbMask.g * green.a * float4(1,1,1,1).a); + RGBColor = lerp(RGBColor, blue.rgb * float4(1,1,1,1).rgb, rgbMask.b * blue.a * float4(1,1,1,1).a); + + baseColor *= RGBColor; + } + else + { + baseColor = lerp(baseColor, red.rgb * float4(1,1,1,1).rgb, rgbMask.r * red.a * float4(1,1,1,1).a); + baseColor = lerp(baseColor, green.rgb * float4(1,1,1,1).rgb, rgbMask.g * green.a * float4(1,1,1,1).a); + baseColor = lerp(baseColor, blue.rgb * float4(1,1,1,1).rgb, rgbMask.b * blue.a * float4(1,1,1,1).a); + } + + return baseColor; + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRGBMask.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRGBMask.cginc.meta new file mode 100644 index 00000000..94cffbe8 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRGBMask.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fa871e0e9f9913840ba74b9a96ad3e51 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRandom.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRandom.cginc new file mode 100644 index 00000000..11f3eea2 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRandom.cginc @@ -0,0 +1,41 @@ +#ifndef POI_RANDOM + #define POI_RANDOM + + float _EnableRandom; + float m_start_Angle; + float _AngleType; + float3 _AngleForwardDirection; + float _CameraAngleMin; + float _CameraAngleMax; + float _ModelAngleMin; + float _ModelAngleMax; + float _AngleMinAlpha; + float _AngleCompareTo; + + float ApplyAngleBasedRendering(float3 modelPos, float3 worldPos) + { + half cameraAngleMin = float(45) / 180; + half cameraAngleMax = float(90) / 180; + half modelAngleMin = float(45) / 180; + half modelAngleMax = float(90) / 180; + float3 pos = float(0) == 0 ? modelPos : worldPos; + half3 cameraToModelDirection = normalize(pos - getCameraPosition()); + half3 modelForwardDirection = normalize(mul(unity_ObjectToWorld, normalize(float4(0,0,1,0)))); + half cameraLookAtModel = remapClamped(.5 * dot(cameraToModelDirection, getCameraForward()) + .5, cameraAngleMax, cameraAngleMin, 0, 1); + half modelLookAtCamera = remapClamped(.5 * dot(-cameraToModelDirection, modelForwardDirection) + .5, modelAngleMax, modelAngleMin, 0, 1); + if (float(0) == 0) + { + return max(cameraLookAtModel, float(0)); + } + else if(float(0) == 1) + { + return max(modelLookAtCamera, float(0)); + } + else if(float(0) == 2) + { + return max(cameraLookAtModel * modelLookAtCamera, float(0)); + } + return 1; + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRandom.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRandom.cginc.meta new file mode 100644 index 00000000..cb0323e2 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRandom.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1807aee6d3d4ffc49b65e170f811165d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRimLighting.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRimLighting.cginc new file mode 100644 index 00000000..e2368475 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRimLighting.cginc @@ -0,0 +1,76 @@ +#ifndef POI_RIM + #define POI_RIM + + float4 _RimLightColor; + float _RimLightingInvert; + float _RimWidth; + float _RimStrength; + float _RimSharpness; + float _RimLightColorBias; + float _ShadowMix; + float _ShadowMixThreshold; + float _ShadowMixWidthMod; + float _EnableRimLighting; + float _RimBrighten; + float _RimLightNormal; + float _RimHueShiftEnabled; + float _RimHueShiftSpeed; + float _RimHueShift; + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_RimTex); + #endif + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_RimMask); + #endif + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_RimWidthNoiseTexture); + #endif + + float _RimWidthNoiseStrength; + + float4 rimColor = float4(0, 0, 0, 0); + float rim = 0; + + void applyRimLighting(inout float4 albedo, inout float3 rimLightEmission) + { + #if defined(PROP_RIMWIDTHNOISETEXTURE) || !defined(OPTIMIZER_ENABLED) + float rimNoise = POI2D_SAMPLER_PAN(_RimWidthNoiseTexture, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float rimNoise = 0; + #endif + rimNoise = (rimNoise - .5) * float(0.1); + + float viewDotNormal = abs(dot(poiCam.viewDir, poiMesh.normals[float(1)])); + + if (float(0)) + { + viewDotNormal = 1 - abs(dot(poiCam.viewDir, poiMesh.normals[float(1)])); + } + float rimWidth = float(0.8); + rimWidth -= rimNoise; + #if defined(PROP_RIMMASK) || !defined(OPTIMIZER_ENABLED) + float rimMask = POI2D_SAMPLER_PAN(_RimMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float rimMask = 1; + #endif + + #if defined(PROP_RIMTEX) || !defined(OPTIMIZER_ENABLED) + rimColor = POI2D_SAMPLER_PAN(_RimTex, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)) * float4(1,1,1,1); + #else + rimColor = float4(1,1,1,1); + #endif + + + if(float(0)) + { + rimColor.rgb = hueShift(rimColor.rgb, float(0) + _Time.x * float(0)); + } + + rimWidth = max(lerp(rimWidth, rimWidth * lerp(0, 1, poiLight.lightMap - float(0.5)) * float(0.5), float(0)), 0); + rim = 1 - smoothstep(min(float(0.1), rimWidth), rimWidth, viewDotNormal); + rim *= float4(1,1,1,1).a * rimColor.a * rimMask; + rimLightEmission = rim * lerp(albedo, rimColor, float(1)) * float(0); + albedo.rgb = lerp(albedo.rgb, lerp(albedo.rgb, rimColor, float(1)) + lerp(albedo.rgb, rimColor, float(1)) * float(0), rim); + } +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRimLighting.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRimLighting.cginc.meta new file mode 100644 index 00000000..afe029a5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiRimLighting.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ce8d7ea5abdde4e4ea4e677a6abac57b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowFrag.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowFrag.cginc new file mode 100644 index 00000000..dca143bd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowFrag.cginc @@ -0,0 +1,123 @@ +#ifndef SHADOW_FRAG + #define SHADOW_FRAG + + float2 _MainDistanceFade; + float _ForceOpaque; + float _MainShadowClipMod; + float2 _ClippingMaskPan; + float _ClippingMaskUV; + sampler3D _DitherMaskLOD; + float2 _MainTexPan; + float _MainTextureUV; + float _Inverse_Clipping; + + half4 fragShadowCaster( + #if !defined(V2F_SHADOW_CASTER_NOPOS_IS_EMPTY) || defined(UNITY_STANDARD_USE_SHADOW_UVS) + V2FShadow i, uint facing: SV_IsFrontFace + #endif + ): SV_Target + { + poiMesh.uv[0] = i.uv; + poiMesh.uv[1] = i.uv1; + poiMesh.uv[2] = i.uv2; + poiMesh.uv[3] = i.uv3; + + // Basically every texture relies on the maintex sampler to function and that's why this is here. + float4 mainTexture = UNITY_SAMPLE_TEX2D(_MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _MainTex) + _Time.x * float4(0,0,0,0)); + + + //Possible Bug with clip + float clipValue = clamp(float(0.5) + float(0), - .001, 1.001); + + poiMesh.vertexColor = saturate(i.vertexColor); + poiMesh.worldPos = i.worldPos; + poiMesh.localPos = i.localPos; + + #ifdef POI_MIRROR + applyMirrorRenderFrag(); + #endif + + #if defined(UNITY_STANDARD_USE_SHADOW_UVS) + + half4 alpha = mainTexture; + + #if defined(PROP_MIRRORTEXTURE) || !defined(OPTIMIZER_ENABLED) + + if (float(0)) + { + if(IsInMirror()) + { + alpha.a = UNITY_SAMPLE_TEX2D_SAMPLER(_MirrorTexture, _MainTex, TRANSFORM_TEX(i.uv, _MirrorTexture)).a; + } + } + #endif + + alpha.a *= smoothstep(float4(0,0,0,0).x, float4(0,0,0,0).y, distance(i.modelPos, _WorldSpaceCameraPos)); + half alphaMask = POI2D_PAN(_ClippingMask, poiMesh.uv[float(0)], float4(0,0,0,0)); + + if(float(0)) + { + alphaMask = 1 - alphaMask; + } + alpha.a *= alphaMask; + alpha.a *= float4(0.8176128,0.7916633,0.7916633,1).a + .0001; + alpha.a += float(0); + alpha.a = saturate(alpha.a); + + + if(float(0) == 0) + { + alpha.a = 1; + } + + + if(float(0) == 1) + { + applyShadowDithering(alpha.a, calcScreenUVs(i.grabPos).xy); + } + + #ifdef POI_DISSOLVE + float3 fakeEmission = 1; + calculateDissolve(alpha, fakeEmission); + #endif + + if(float(0) == 1) + { + clip(alpha.a - 0.001); + } + + /* + return poiMesh.vertexColor.g; + + #ifdef POI_RANDOM + alpha.a *= i.angleAlpha; + #endif + + + if(float(0) >= 1) + { + applySpawnInShadow(uv[0], i.localPos); + + #if defined(POI_FLIPBOOK) + alpha.a *= applyFlipbookAlphaToShadow(uv[float(0)]); + #endif + } + */ + + if (float(0) == 1) + { + clip(alpha.a - clipValue); + } + + + if(float(0) > 1) + { + float dither = tex3D(_DitherMaskLOD, float3(i.pos.xy * .25, alpha.a * 0.9375)).a; + clip(dither - 0.01); + } + + #endif + SHADOW_CASTER_FRAGMENT(i) + } + + #endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowFrag.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowFrag.cginc.meta new file mode 100644 index 00000000..7fbe2031 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a31151ee24dad53428a2e3a6ea544f17 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowIncludes.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowIncludes.cginc new file mode 100644 index 00000000..0ad76364 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowIncludes.cginc @@ -0,0 +1,44 @@ +#ifndef SHADOW_INCLUDES + #define SHADOW_INCLUDES + + #define UNITY_STANDARD_USE_SHADOW_UVS 1 + + float4 _Color; + sampler2D _ClippingMask; float4 _ClippingMask_ST; + + struct VertexInputShadow + { + float4 vertex: POSITION; + float3 normal: NORMAL; + float4 tangent: TANGENT; + float4 color: COLOR; + float2 uv0: TEXCOORD0; + float2 uv1: TEXCOORD1; + float2 uv2: TEXCOORD2; + float2 uv3: TEXCOORD3; + uint vertexId : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + #if !defined(V2F_SHADOW_CASTER_NOPOS_IS_EMPTY) || defined(UNITY_STANDARD_USE_SHADOW_UVS) + struct V2FShadow + { + V2F_SHADOW_CASTER_NOPOS + float4 pos: SV_POSITION; + float2 uv: TEXCOORD1; + float2 uv1: TEXCOORD2; + float2 uv2: TEXCOORD3; + float2 uv3: TEXCOORD4; + float3 modelPos: TEXCOORD5; + float4 worldPos: TEXCOORD6; + float4 localPos: TEXCOORD7; + float3 angleAlpha: TEXCOORD8; + float4 grabPos: TEXCOORD9; + fixed3 barycentricCoordinates: TEXCOORD10; + float4 vertexColor: TEXCOORD11; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + #endif + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowIncludes.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowIncludes.cginc.meta new file mode 100644 index 00000000..94e0e209 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowIncludes.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2f099afb14759f3499fd14050b48484d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowVert.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowVert.cginc new file mode 100644 index 00000000..8a786e19 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowVert.cginc @@ -0,0 +1,86 @@ +float _EnableTouchGlow; +float _EnableBulge; +float _VertexManipulationHeightUV; + +V2FShadow vertShadowCaster(VertexInputShadow v) +{ + V2FShadow o; + UNITY_SETUP_INSTANCE_ID(v); + #ifdef RALIV_PENETRATION + applyRalivDynamicOrifaceSystem(v); + #endif + #ifdef AUTO_EXPOSURE + applyLocalVertexTransformation(v.normal, v.vertex); + #endif + + UNITY_INITIALIZE_OUTPUT(V2FShadow, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + + #ifdef RALIV_PENETRATION + applyRalivDynamicPenetrationSystem(o.localPos.rgb, v.normal.rgb, v); + #endif + + o.modelPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)); + o.uv = v.uv0; + o.uv1 = v.uv1; + o.uv2 = v.uv2; + o.uv3 = v.uv3; + + + float2 uvToUse = 0; + + if (float(0) == 0) + { + uvToUse = v.uv0.xy; + } + + if(float(0) == 1) + { + uvToUse = v.uv1.xy; + } + + if(float(0) == 2) + { + uvToUse = v.uv2.xy; + } + + if(float(0) == 3) + { + uvToUse = v.uv3.xy; + } + #ifdef AUTO_EXPOSURE + applyWorldVertexTransformation(o.worldPos, o.localPos, v.normal, uvToUse); + #endif + applyVertexGlitching(o.worldPos, o.localPos); + applySpawnInVert(o.worldPos, o.localPos, v.uv0.xy); + #ifdef AUTO_EXPOSURE + applyVertexRounding(o.worldPos, o.localPos); + #endif + o.pos = UnityObjectToClipPos(o.localPos); + o.grabPos = ComputeGrabScreenPos(o.pos); + o.modelPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)); + o.vertexColor = v.color; + + + if(float(0) || float(0)) + { + o.pos = UnityObjectToClipPos(float3(0, 0, -5)); + o.localPos.xyz = float3(0, 0, -5); + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + } + + o.angleAlpha = 1; + #ifdef POI_RANDOM + o.angleAlpha = ApplyAngleBasedRendering(o.modelPos, o.worldPos); + #endif + + + o.pos = UnityClipSpaceShadowCasterPos(o.localPos, v.normal); + o.pos = UnityApplyLinearShadowBias(o.pos); + + return o; +} diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowVert.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowVert.cginc.meta new file mode 100644 index 00000000..4a5a475f --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiShadowVert.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c140d4e900245d94084cf15a10e07698 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInFrag.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInFrag.cginc new file mode 100644 index 00000000..20e0a841 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInFrag.cginc @@ -0,0 +1,58 @@ +#ifndef POI_SPAWN_IN_FRAG + #define POI_SPAWN_FRAG + + #ifndef SPAWN_IN_VARIABLES + #define SPAWN_IN_VARIABLES + + float3 _SpawnInGradientStart; + float3 _SpawnInGradientFinish; + fixed _SpawnInAlpha; + fixed _SpawnInNoiseIntensity; + float3 _SpawnInEmissionColor; + float _SpawnInEmissionOffset; + float _SpawnInVertOffset; + float _SpawnInVertOffsetOffset; + float _EnableScifiSpawnIn; + #endif + + UNITY_DECLARE_TEX2D_NOSAMPLER(_SpawnInNoise); float4 _SpawnInNoise_ST; + + float calculateGradientValueFrag(float3 start, float3 finish, float3 localPos) + { + return inverseLerp3(start, finish, localPos); + } + + void applySpawnIn(inout float4 finalColor, inout float3 spawnInEmission, float2 uv, float3 localPos) + { + + if (float(0)) + { + float noise = UNITY_SAMPLE_TEX2D_SAMPLER(_SpawnInNoise, _MainTex, TRANSFORM_TEX(uv, _SpawnInNoise)).r * float(0) * float(0.35); + float gradient = calculateGradientValueFrag(float4(0,2,0,1), float4(0,-2,0,1), localPos); + float inverseGradient = 1 - gradient; + float alpha = gradient - float(0) - noise; + spawnInEmission = saturate(inverseGradient + float(0) + float(0.1) +noise - 1) * float4(1,1,1,1); + + if(float(0) >= 1) + { + clip(ceil(alpha) - 0.001); + } + } + } + + void applySpawnInShadow(float2 uv, float3 localPos) + { + + if(float(0)) + { + float noise = UNITY_SAMPLE_TEX2D_SAMPLER(_SpawnInNoise, _MainTex, TRANSFORM_TEX(uv, _SpawnInNoise)).r * float(0) * float(0.35); + float gradient = calculateGradientValueFrag(float4(0,2,0,1), float4(0,-2,0,1), localPos); + float alpha = gradient - float(0) - noise + length(float(10)); + + if(float(0) >= 1) + { + clip(ceil(alpha) - 0.001); + } + } + } +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInFrag.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInFrag.cginc.meta new file mode 100644 index 00000000..bb26f2a0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInFrag.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 34e7d6dc8a4ded64b814d29f48adf5ee +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInVert.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInVert.cginc new file mode 100644 index 00000000..26b32eff --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInVert.cginc @@ -0,0 +1,40 @@ +#ifndef POI_SPAWN_IN_FRAG + #define POI_SPAWN_FRAG + + #ifndef SPAWN_IN_VARIABLES + #define SPAWN_IN_VARIABLES + + float3 _SpawnInGradientStart; + float3 _SpawnInGradientFinish; + fixed _SpawnInAlpha; + fixed _SpawnInNoiseIntensity; + float3 _SpawnInEmissionColor; + float _SpawnInEmissionOffset; + float _SpawnInVertOffset; + float _SpawnInVertOffsetOffset; + float _EnableScifiSpawnIn; + + #endif + //sampler2D _SpawnInNoiseVert; float4 _SpawnInNoiseVert_ST; + + float calculateGradientValueVert(float3 start, float3 finish, float3 localPos) + { + return inverseLerp3(start, finish, localPos); + } + + void applySpawnInVert(inout float4 worldPos, inout float4 localPos, float2 uv) + { + + if (float(0)) + { + float noise = 0; + float gradient = calculateGradientValueVert(float4(0,2,0,1), float4(0,-2,0,1), localPos.xyz); + float inverseGradient = 1 - gradient; + float alpha = gradient - float(0) - noise; + worldPos.xyz += saturate(inverseGradient + float(0) + float(0.1) -1) * float3(0, float(10), 0); + localPos.xyz = mul(unity_WorldToObject, worldPos).xyz; + } + //float noise = tex2Dlod(_SpawnInNoise, float4(TRANSFORM_TEX(uv, _SpawnInNoise))).r * float(0) * float(0.35); + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInVert.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInVert.cginc.meta new file mode 100644 index 00000000..2e6e7798 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpawnInVert.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 050fb5c16af8a9c4bb21dcfe32bd80f5 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpecular.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpecular.cginc new file mode 100644 index 00000000..1e89f5c5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpecular.cginc @@ -0,0 +1,483 @@ +#ifndef POI_SPECULAR + #define POI_SPECULAR + float _SpecWhatTangent; + float _SpecularType; + float _SmoothnessFrom; + POI_TEXTURE_NOSAMPLER(_SpecularMetallicMap); + POI_TEXTURE_NOSAMPLER(_SpecularMap); + fixed _CenterOutSpecColor; + POI_TEXTURE_NOSAMPLER(_SpecularAnisoJitterMicro); + float _SpecularAnisoJitterMirrored; + POI_TEXTURE_NOSAMPLER(_SpecularAnisoJitterMacro); + POI_TEXTURE_NOSAMPLER(_SpecularAnisoFakeUV); + POI_TEXTURE_NOSAMPLER(_AnisoTangentMap); + POI_TEXTURE_NOSAMPLER(_SpecularMask); + float _SpecularAnisoJitterMicroMultiplier; + float _SpecularAnisoJitterMacroMultiplier; + float4 _SpecularTint; + float _SpecularSmoothness; + float _Spec1Offset; + float _Spec1JitterStrength; + float _Spec2Smoothness; + float _Spec2Offset; + float _Spec2JitterStrength; + float _AnisoUseTangentMap; + float _AnisoSpec1Alpha; + float _AnisoSpec2Alpha; + float _SpecularInvertSmoothness; + half _SpecularMetallic; + float _SpecularNormal; + float _SpecularNormal1; + // Toon + fixed _SpecularToonStart; + fixed _SpecularToonEnd; + half4 _SpecularToonInnerOuter; + + #ifdef DITHERING + float _EnableSpecular1; + float _SpecWhatTangent1; + float _SpecularType1; + float _SmoothnessFrom1; + POI_TEXTURE_NOSAMPLER(_SpecularMetallicMap1); + POI_TEXTURE_NOSAMPLER(_SpecularMap1); + POI_TEXTURE_NOSAMPLER(_SpecularAnisoJitterMicro1); + POI_TEXTURE_NOSAMPLER(_SpecularAnisoJitterMacro1); + float _SpecularAnisoJitterMirrored1; + POI_TEXTURE_NOSAMPLER(_AnisoTangentMap1); + POI_TEXTURE_NOSAMPLER(_SpecularMask1); + float _SpecularAnisoJitterMicroMultiplier1; + float _SpecularAnisoJitterMacroMultiplier1; + float4 _SpecularTint1; + float _SpecularSmoothness1; + float _Spec1Offset1; + float _Spec1JitterStrength1; + float _Spec2Smoothness1; + float _Spec2Offset1; + float _Spec2JitterStrength1; + float _AnisoUseTangentMap1; + float _AnisoSpec1Alpha1; + float _AnisoSpec2Alpha1; + float _SpecularInvertSmoothness1; + half _SpecularMetallic1; + // Toon + half4 _SpecularToonInnerOuter1; + fixed _SpecularToonStart1; + fixed _SpecularToonEnd1; + #endif + UnityIndirect ZeroIndirect() + { + UnityIndirect ind; + ind.diffuse = 0; + ind.specular = 0; + return ind; + } + + // From unity just putting it here in case I want to mod it + half4 poiRealisticSpecular(half3 diffColor, half3 specColor, half oneMinusReflectivity, half smoothness, + float3 normal, float3 halfDir, + UnityLight light, UnityIndirect gi) + { + float perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness); + #define UNITY_HANDLE_CORRECTLY_NEGATIVE_NDOTV 0 + + #if UNITY_HANDLE_CORRECTLY_NEGATIVE_NDOTV + half shiftAmount = dot(normal, poiCam.viewDir); + normal = shiftAmount < 0.0f ? normal + poiCam.viewDir * (-shiftAmount + 1e-5f): normal; + float nv = saturate(dot(normal, poiCam.viewDir)); + #else + half nv = abs(dot(normal, poiCam.viewDir)); + #endif + + float nl = saturate(dot(normal, light.dir)); + float nh = saturate(dot(normal, halfDir)); + + half lv = saturate(dot(light.dir, poiCam.viewDir)); + half lh = saturate(dot(light.dir, halfDir)); + + half diffuseTerm = DisneyDiffuse(nv, nl, lh, perceptualRoughness) * nl; + + float roughness = PerceptualRoughnessToRoughness(perceptualRoughness); + + roughness = max(roughness, 0.002); + float V = SmithJointGGXVisibilityTerm(nl, nv, roughness); + float D = GGXTerm(nh, roughness); + + float specularTerm = V * D * UNITY_PI; + + #ifdef UNITY_COLORSPACE_GAMMA + specularTerm = sqrt(max(1e-4h, specularTerm)); + #endif + + specularTerm = max(0, specularTerm * nl); + #if defined(_POI_SPECULARHIGHLIGHTS_OFF) + specularTerm = 0.0; + #endif + + half surfaceReduction; + #ifdef UNITY_COLORSPACE_GAMMA + surfaceReduction = 1.0 - 0.28 * roughness * perceptualRoughness; + #else + surfaceReduction = 1.0 / (roughness * roughness + 1.0); + #endif + + specularTerm *= any(specColor) ? 1.0: 0.0; + + half grazingTerm = saturate(smoothness + (1 - oneMinusReflectivity)); + half3 color = diffColor * (gi.diffuse + light.color * diffuseTerm) + + specularTerm * light.color * FresnelTerm(specColor, lh) + + surfaceReduction * gi.specular * FresnelLerp(specColor, grazingTerm, nv); + + return half4(color, 1); + } + + half3 calculateRealisticSpecular(float4 albedo, float2 uv, float4 specularTint, float specularSmoothness, float invertSmoothness, float mixAlbedoWithTint, float4 specularMap, float3 specularLight, float3 normal, float attenuation, float3 lightDirection, float nDotL, float3 halfDir) + { + half oneMinusReflectivity; + half3 finalSpecular; + UnityLight unityLight; + unityLight.color = specularLight; + unityLight.dir = lightDirection; + unityLight.ndotl = nDotL; + + + if (float(1) == 0) + { + half3 diffColor = EnergyConservationBetweenDiffuseAndSpecular(albedo, specularMap.rgb * specularTint.rgb, /*out*/ oneMinusReflectivity); + finalSpecular = poiRealisticSpecular(diffColor, specularMap.rgb, oneMinusReflectivity, specularMap.a * specularSmoothness * lerp(1, -1, invertSmoothness), normal, halfDir, unityLight, ZeroIndirect()); + } + else + { + half3 diffColor = EnergyConservationBetweenDiffuseAndSpecular(albedo, specularTint.rgb, /*out*/ oneMinusReflectivity); + float smoothness = max(max(specularMap.r, specularMap.g), specularMap.b); + finalSpecular = poiRealisticSpecular(diffColor, 1, oneMinusReflectivity, smoothness * specularSmoothness * lerp(1, -1, invertSmoothness), normal, halfDir, unityLight, ZeroIndirect()); + } + finalSpecular *= lerp(1, albedo.rgb, mixAlbedoWithTint); + return finalSpecular; + } + + half3 calculateToonSpecular(float4 albedo, float2 uv, float2 specularToonInnerOuter, float specularMixAlbedoIntoTint, float smoothnessFrom, float4 specularMap, float3 specularLight, float3 normal, float3 halfDir, float attenuation) + { + half3 finalSpecular = smoothstep(1 - specularToonInnerOuter.y, 1 - specularToonInnerOuter.x, dot(halfDir, normal)) * specularLight; + + if (smoothnessFrom == 0) + { + finalSpecular.rgb *= specularMap.rgb * lerp(1, albedo.rgb, specularMixAlbedoIntoTint); + finalSpecular *= specularMap.a; + } + else + { + finalSpecular *= specularMap.r * lerp(1, albedo.rgb, specularMixAlbedoIntoTint); + } + return finalSpecular; + } + + float3 strandSpecular(float TdotL, float TdotV, float specPower, float nDotL) + { + #ifdef FORWARD_ADD_PASS + nDotL *= poiLight.attenuation * poiLight.additiveShadow; + #endif + float Specular = saturate(nDotL) * pow(saturate(sqrt(1.0 - (TdotL * TdotL)) * sqrt(1.0 - (TdotV * TdotV)) - TdotL * TdotV), specPower); + half normalization = sqrt((specPower + 1) * ((specPower) + 1)) / (8 * pi); + Specular *= normalization; + return Specular; + } + + half3 AnisotropicSpecular( + float specWhatTangent, float anisoUseTangentMap, float specularSmoothness, float spec2Smoothness, + float anisoSpec1Alpha, float anisoSpec2Alpha, float4 specularTint, float specularMixAlbedoIntoTint, float4 specularMap, float3 specularLight, float3 lightDirection, float3 halfDir, float nDotL, float jitter, float4 packedTangentMap, in float4 albedo) + { + float3 tangentOrBinormal = specWhatTangent ? poiMesh.tangent: poiMesh.binormal; + + + float3 normalLocalAniso = lerp(float3(0, 0, 1), UnpackNormal(packedTangentMap), anisoUseTangentMap); + normalLocalAniso = BlendNormals(normalLocalAniso, poiMesh.tangentSpaceNormal); + //float3 normalDirection = normalize(mul(poiMesh.normals[float(1)], poiTData.tangentTransform)); + float3 normalDirectionAniso = Unity_SafeNormalize(mul(normalLocalAniso, poiTData.tangentTransform)); + float3 tangentDirection = mul(poiTData.tangentTransform, tangentOrBinormal).xyz; + float3 viewReflectDirectionAniso = reflect(-poiCam.viewDir, normalDirectionAniso); // possible bad negation + float3 tangentDirectionMap = mul(poiTData.tangentToWorld, float3(normalLocalAniso.rg, 0.0)).xyz; + tangentDirectionMap = normalize(lerp(tangentOrBinormal, tangentDirectionMap, anisoUseTangentMap)); + + tangentDirectionMap += float(0) +jitter; + + float TdotL = dot(lightDirection, tangentDirectionMap); + float TdotV = dot(poiCam.viewDir, tangentDirectionMap); + float TdotH = dot(halfDir, tangentDirectionMap); + half specPower = RoughnessToSpecPower(1.0 - specularSmoothness * specularMap.a); + half spec2Power = RoughnessToSpecPower(1.0 - spec2Smoothness * specularMap.a); + half Specular = 0; + + float3 spec = strandSpecular(TdotL, TdotV, specPower, nDotL) * anisoSpec1Alpha; + float3 spec2 = strandSpecular(TdotL, TdotV, spec2Power, nDotL) * anisoSpec2Alpha; + + return max(spec, spec2) * specularMap.rgb * specularTint.a * specularLight * lerp(1, albedo.rgb, specularMixAlbedoIntoTint); + } + + inline float3 toonAnisoSpecular(float specWhatTangent, float anisoUseTangentMap, float3 lightDirection, float halfDir, float4 specularMap, float nDotL, fixed gradientStart, fixed gradientEnd, float4 specColor, float4 finalColor, fixed metallic, float jitter, float mirrored, float4 packedTangentMap) + { + float3 tangentOrBinormal = specWhatTangent ? poiMesh.tangent: poiMesh.binormal; + + float3 normalLocalAniso = lerp(float3(0, 0, 1), UnpackNormal(packedTangentMap), anisoUseTangentMap); + normalLocalAniso = BlendNormals(normalLocalAniso, poiMesh.tangentSpaceNormal); + //float3 normalDirection = normalize(mul(poiMesh.normals[float(1)], poiTData.tangentTransform)); + float3 normalDirectionAniso = Unity_SafeNormalize(mul(normalLocalAniso, poiTData.tangentTransform)); + float3 tangentDirection = mul(poiTData.tangentTransform, tangentOrBinormal).xyz; + float3 viewReflectDirectionAniso = reflect(-poiCam.viewDir, normalDirectionAniso); // possible bad negation + float3 tangentDirectionMap = mul(poiTData.tangentToWorld, float3(normalLocalAniso.rg, 0.0)).xyz; + tangentDirectionMap = normalize(lerp(tangentOrBinormal, tangentDirectionMap, anisoUseTangentMap)); + + if (!mirrored) + { + tangentDirectionMap += jitter; + } + + float TdotL = dot(lightDirection, tangentDirectionMap); + float TdotV = dot(poiCam.viewDir, tangentDirectionMap); + float TdotH = dot(halfDir, tangentDirectionMap); + + float specular = saturate(sqrt(1.0 - (TdotL * TdotL)) * sqrt(1.0 - (TdotV * TdotV)) - TdotL * TdotV); + + fixed smoothAlpha = specular; + if(mirrored) + { + smoothAlpha = max(specular - jitter, 0); + } + + specular = smoothstep(gradientStart, gradientEnd, smoothAlpha); + + /* + + if(_CenterOutSpecColor) + { + specularMap = POI2D_SAMPLER_PAN(_SpecularMap, _MainTex, clamp(float2(specular, specular), 0.01, .99), float4(0,0,0,0)); + } + */ + + #ifdef FORWARD_ADD_PASS + nDotL *= poiLight.attenuation * poiLight.additiveShadow; + #endif + + return saturate(nDotL) * specular * poiLight.color * specColor * specularMap.rgb * lerp(1, finalColor, metallic) * specularMap.a; + } + + inline float SpecularHQ(half roughness, half dotNH, half dotLH) + { + roughness = saturate(roughness); + roughness = max((roughness * roughness), 0.002); + half roughnessX2 = roughness * roughness; + + half denom = dotNH * dotNH * (roughnessX2 - 1.0) + 1.0f; + half D = roughnessX2 / (3.14159 * denom * denom); + + half k = roughness / 2.0f; + half k2 = k * k; + half invK2 = 1.0f - k2; + + half vis = rcp(dotLH * dotLH * invK2 + k2); + + float specTerm = vis * D; + + return specTerm; + } + + float3 calculateNewSpecular(in float3 specularMap, uint colorFrom, in float4 albedo, in float3 specularTint, in float specularMetallic, in float specularSmoothness, in half dotNH, in half dotLH, in float3 lightColor, in float attenuation) + { + float3 specColor = specularTint; + float metallic = specularMetallic; + float roughness = 1 - specularSmoothness; + float perceptualRoughness = roughness; + //float reflectInverse = DielectricSpec.a - metallic * DielectricSpec.a; + //float reflectivity = 1.0h - reflectInverse; + float3 specMapColor = lerp(specularMap, 1, colorFrom); + float3 specularColor = lerp(DielectricSpec.rgb * specMapColor, lerp(specularMap, albedo.rgb, colorFrom), metallic); + //albedo.rgb *= reflectInverse; + return clamp(specularColor * lightColor * attenuation * specularTint * SpecularHQ(perceptualRoughness, dotNH, dotLH), 0, lightColor * specularTint); + } + + float3 calculateSpecular(in float4 albedo) + { + half3 finalSpecular = 0; + half3 finalSpecular1 = 0; + float4 realisticAlbedo = albedo; + float4 realisticAlbedo1 = albedo; + float4 specularMap = POI2D_SAMPLER_PAN(_SpecularMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + half metallic = POI2D_SAMPLER_PAN(_SpecularMetallicMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r * float(0); + half specularMask = POI2D_SAMPLER_PAN(_SpecularMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + float attenuation = saturate(poiLight.nDotL); + + #ifdef FORWARD_ADD_PASS + attenuation *= poiLight.attenuation * poiLight.additiveShadow; + #endif + + #ifdef POI_LIGHTING + + if (float(4) == 0 && float(0) == 1) + { + attenuation = poiLight.rampedLightMap; + } + #endif + + + if(float(1) == 1) // Realistic + { + if (float(1) == 1) + { + specularMap.a = specularMap.r; + specularMap.rgb = 1; + } + + if(float(0)) + { + specularMap.a = 1 - specularMap.a; + } + + finalSpecular += calculateNewSpecular(specularMap.rgb, float(1), realisticAlbedo, float4(1,1,1,1), metallic, float(1) * specularMap.a, poiLight.dotNH, poiLight.dotLH, poiLight.color, attenuation); + } + + + if(float(1) == 4) + { + float jitter = 0; + float microJitter = POI2D_SAMPLER_PAN(_SpecularAnisoJitterMicro, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r; + fixed jitterOffset = (1 - float(0)) * .5; + jitter += (POI2D_SAMPLER_PAN(_SpecularAnisoJitterMicro, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r - jitterOffset) * float(0); + jitter += (POI2D_SAMPLER_PAN(_SpecularAnisoJitterMacro, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r - jitterOffset) * float(0); + jitter += float(0); + + float4 packedTangentMap = POI2D_SAMPLER_PAN(_AnisoTangentMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + + finalSpecular += toonAnisoSpecular(float(0), float(0), poiLight.direction, poiLight.halfDir, specularMap, poiLight.nDotL, float(0.95), float(1), float4(1,1,1,1), albedo, metallic, jitter, float(0), packedTangentMap); + finalSpecular *= attenuation; + } + + #ifdef FORWARD_BASE_PASS + + if(float(1) == 2) // Toon + { + finalSpecular += calculateToonSpecular(albedo, poiMesh.uv[0], float4(0.25,0.3,0,1), metallic, float(1), specularMap, poiLight.color, poiMesh.normals[float(1)], poiLight.halfDir, poiLight.attenuation); + finalSpecular *= float4(1,1,1,1); + } + + if (float(1) == 3) // anisotropic + { + float jitter = 0; + float microJitter = POI2D_SAMPLER_PAN(_SpecularAnisoJitterMicro, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r; + fixed jitterOffset = (1 - float(0)) * .5; + jitter += (POI2D_SAMPLER_PAN(_SpecularAnisoJitterMicro, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r - jitterOffset) * float(0); + jitter += (POI2D_SAMPLER_PAN(_SpecularAnisoJitterMacro, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r - jitterOffset) * float(0); + jitter += float(0); + + float4 packedTangentMap = POI2D_SAMPLER_PAN(_AnisoTangentMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + + finalSpecular += AnisotropicSpecular(float(0), float(0), float(1), float(0), float(1), float(1), float4(1,1,1,1), metallic, specularMap, poiLight.color, poiLight.direction, poiLight.halfDir, poiLight.nDotL, jitter, packedTangentMap, albedo); + finalSpecular *= float4(1,1,1,1); + finalSpecular *= attenuation; + } + #endif + + #ifdef VERTEXLIGHT_ON + // Non Important Lights + for (int index = 0; index < 4; index ++) + { + attenuation = poiLight.vAttenuationDotNL[index]; + + if (float(1) == 1) // Realistic + { + finalSpecular += calculateNewSpecular(specularMap.rgb, float(1), realisticAlbedo, float4(1,1,1,1), metallic, float(1) * specularMap.a, poiLight.vDotNH[index], poiLight.vDotLH[index], poiLight.vColor[index], poiLight.vAttenuationDotNL[index]); + } + } + #endif + + finalSpecular *= float4(1,1,1,1).a; + finalSpecular = finalSpecular.rgb; + finalSpecular *= specularMask; + #ifdef DITHERING + float4 specularMap1 = POI2D_SAMPLER_PAN(_SpecularMap1, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + half specularMask1 = POI2D_SAMPLER_PAN(_SpecularMask1, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + half metallic1 = POI2D_SAMPLER_PAN(_SpecularMetallicMap1, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r * float(0); + + if (float(1) == 1) // Realistic + { + + if (float(1) == 1) + { + specularMap1.a = specularMap1.r; + specularMap1.rgb = 1; + } + else + { + realisticAlbedo1.rgb = specularMap1.rgb; + } + + + if(float(0)) + { + specularMap1.a = 1 - specularMap1.a; + } + + finalSpecular1 = calculateNewSpecular(specularMap1.rgb, float(1), realisticAlbedo1, float4(1,1,1,1), metallic1, float(0.75) * specularMap1.a, poiLight.dotNH, poiLight.dotLH, poiLight.color, attenuation); + } + + + if(float(1) == 4) + { + float jitter = 0; + float microJitter = POI2D_SAMPLER_PAN(_SpecularAnisoJitterMicro1, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r; + fixed jitterOffset = (1 - float(0)) * .5; + jitter += (POI2D_SAMPLER_PAN(_SpecularAnisoJitterMicro1, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r - jitterOffset) * float(0); + jitter += (POI2D_SAMPLER_PAN(_SpecularAnisoJitterMacro1, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r - jitterOffset) * float(0); + jitter += float(0); + + float4 packedTangentMap = POI2D_SAMPLER_PAN(_AnisoTangentMap1, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + + finalSpecular1 += toonAnisoSpecular(float(0), float(0), poiLight.direction, poiLight.halfDir, specularMap1, poiLight.nDotL, float(0.95), float(1), float4(1,1,1,1), albedo, metallic1, jitter, float(0), packedTangentMap); + finalSpecular1 *= poiLight.attenuation; + } + + + if(float(1) == 2) // Toon + { + finalSpecular1 = calculateToonSpecular(albedo, poiMesh.uv[0], float4(0.25,0.3,0,1), metallic1, float(1), specularMap1, poiLight.color, poiMesh.normals[float(1)], poiLight.halfDir, poiLight.attenuation); + finalSpecular1 *= float4(1,1,1,1); + } + + if (float(1) == 3) // anisotropic + { + float jitter = 0; + float microJitter = POI2D_SAMPLER_PAN(_SpecularAnisoJitterMicro1, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r; + fixed jitterOffset = (1 - float(0)) * .5; + jitter += (POI2D_SAMPLER_PAN(_SpecularAnisoJitterMicro1, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r - jitterOffset) * float(0); + jitter += (POI2D_SAMPLER_PAN(_SpecularAnisoJitterMacro1, _MainTex, float2(poiMesh.uv[float(0)]), float4(0,0,0,0)).r - jitterOffset) * float(0); + jitter += float(0); + + float4 packedTangentMap = POI2D_SAMPLER_PAN(_AnisoTangentMap1, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + + finalSpecular1 = AnisotropicSpecular(float(0), float(0), float(0.75), float(0), float(1), float(1), float4(1,1,1,1), metallic1, specularMap1, poiLight.color, poiLight.direction, poiLight.halfDir, poiLight.nDotL, jitter, packedTangentMap, albedo); + finalSpecular1 *= float4(1,1,1,1); + finalSpecular1 *= poiLight.attenuation; + } + + #ifdef FORWARD_BASE_PASS + // Non Important Lights + #ifdef VERTEXLIGHT_ON + for (int index = 0; index < 4; index ++) + { + attenuation = poiLight.vAttenuationDotNL[index]; + + if (float(1) == 1) // Realistic + { + finalSpecular1 += calculateNewSpecular(specularMap1.rgb, float(1), realisticAlbedo1, float4(1,1,1,1), metallic1, float(0.75) * specularMap1.a, poiLight.vDotNH[index], poiLight.vDotLH[index], poiLight.vColor[index], poiLight.vAttenuationDotNL[index]); + } + } + #endif + #endif + + finalSpecular1 *= float4(1,1,1,1).a; + finalSpecular1 = finalSpecular1.rgb; + finalSpecular1 *= specularMask1; + + #endif + return finalSpecular + finalSpecular1; + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpecular.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpecular.cginc.meta new file mode 100644 index 00000000..5d9ac4b5 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSpecular.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f77e11c45635d9541bc0cd508076e2e8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSubsurfaceScattering.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSubsurfaceScattering.cginc new file mode 100644 index 00000000..fe4836ee --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSubsurfaceScattering.cginc @@ -0,0 +1,75 @@ +#ifndef SUBSURFACE + #define SUBSURFACE + /* + float _SSSThickness; + half4 _SSSColor; + float _SSSPointLightDirectionality; + float _SSSNormalOffset; + float _SSSStrength; + float _SSSExponent; + float _SSSNDotL; + float _SSSConstant; + + #if defined(PROP_SSSTHICKNESSMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_SSSThicknessMap); + #endif + + half3 calculateSubsurfaceScattering(const float4 albedo) + { + #if defined(PROP_SSSTHICKNESSMAP) || !defined(OPTIMIZER_ENABLED) + float thicknessMap = 1 - POI2D_SAMPLER_PAN(_SSSThicknessMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float thicknessMap = 1; + #endif + + half4 translucencyColor = float4(1,0,0,1); + float3 lightDir = poiLight.direction; + + #ifdef FORWARD_BASE_PASS + half tLitDot = saturate(dot((poiLight.direction + poiMesh.normals[1] * _SSSNormalOffset), -poiCam.viewDir)); + #else + float3 lightDirectional = normalize(_WorldSpaceLightPos0.xyz - poiCam.worldPos); + lightDir = normalize(lerp(poiLight.direction, lightDirectional, _SSSPointLightDirectionality)); + half tLitDot = saturate(dot((poiLight.direction + poiMesh.normals[1] * _SSSNormalOffset), -poiCam.viewDir)); + #endif + + tLitDot = exp2(-_SSSExponent * (1 - tLitDot)) * _SSSStrength; + float NDotL = abs(dot(poiLight.direction, poiMesh.normals[1])); + tLitDot *= lerp(1, NDotL, _SSSNDotL); + + half translucencyOcclusion = lerp(1, thicknessMap, _SSSThickness); + half translucencyAtten = (tLitDot + _SSSConstant * (NDotL + 0.1)) * translucencyOcclusion; + + return translucencyAtten * albedo.rgb * translucencyColor.rgb * poiLight.lightMap * poiLight.color; + } + */ + + float _SSSThicknessMod; + float _SSSSCale; + float _SSSPower; + float _SSSDistortion; + float4 _SSSColor; + float _EnableSSS; + + #if defined(PROP_SSSTHICKNESSMAP) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_SSSThicknessMap); + #endif + + float3 calculateSubsurfaceScattering() + { + #if defined(PROP_SSSTHICKNESSMAP) || !defined(OPTIMIZER_ENABLED) + float SSS = 1 - POI2D_SAMPLER_PAN(_SSSThicknessMap, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)); + #else + float SSS = 1; + #endif + half3 vLTLight = poiLight.direction + poiMesh.normals[0] * float(1); + half flTDot = pow(saturate(dot(poiCam.viewDir, -vLTLight)), float(5)) * float(0.25); + #ifdef FORWARD_BASE_PASS + half3 fLT = (flTDot) * saturate(SSS + - 1 * float(0)); + #else + half3 fLT = poiLight.attenuation * (flTDot) * saturate(SSS + - 1 * float(0)); + #endif + + return fLT * poiLight.color * float4(1,0,0,1) * poiLight.attenuation; + } +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSubsurfaceScattering.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSubsurfaceScattering.cginc.meta new file mode 100644 index 00000000..0c2f1a42 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiSubsurfaceScattering.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e2ec734d909ceba4da3ab4ad21195560 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiTessellation.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiTessellation.cginc new file mode 100644 index 00000000..4912473d --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiTessellation.cginc @@ -0,0 +1,117 @@ +#ifndef POI_TESSELLATION + #define POI_TESSELLATION + + float _TessellationPhongStrength; + float _TessellationEdgeLength; + float _TessellationExtrusionAmount; + float _TessellationUniform; + + struct TessellationControlPoint + { + float4 vertex: INTERNALTESSPOS; + float3 normal: NORMAL; + float4 tangent: TANGENT; + float4 color: COLOR; + float2 uv0: TEXCOORD0; + float2 uv1: TEXCOORD1; + float2 uv2: TEXCOORD2; + float2 uv3: TEXCOORD3; + }; + + struct TessellationFactors + { + float edge[3]: SV_TessFactor; + float inside: SV_InsideTessFactor; + }; + + TessellationControlPoint poiTessellationVert(appdata v) + { + TessellationControlPoint p; + p.vertex = v.vertex; + p.normal = v.normal; + p.tangent = v.tangent; + p.color = v.color; + p.uv0 = v.uv0; + p.uv1 = v.uv1; + p.uv2 = v.uv2; + p.uv3 = v.uv3; + return p; + } + + float TessellationEdgeFactor(float3 p0, float3 p1) + { + #ifndef _FADING_ON + float edgeLength = distance(p0, p1); + + float3 edgeCenter = (p0 + p1) * 0.5; + float viewDistance = distance(edgeCenter, _WorldSpaceCameraPos); + + return edgeLength * _ScreenParams.y / + (_TessellationEdgeLength * viewDistance); + #else + return _TessellationUniform; + #endif + } + + TessellationFactors poiPatchConst( + InputPatch < TessellationControlPoint, 3 > patch + ) + { + + TessellationFactors f; + float3 p0 = mul(unity_ObjectToWorld, patch[0].vertex).xyz; + float3 p1 = mul(unity_ObjectToWorld, patch[1].vertex).xyz; + float3 p2 = mul(unity_ObjectToWorld, patch[2].vertex).xyz; + f.edge[0] = TessellationEdgeFactor(p1, p2); + f.edge[1] = TessellationEdgeFactor(p2, p0); + f.edge[2] = TessellationEdgeFactor(p0, p1); + f.inside = (TessellationEdgeFactor(p1, p2) + + TessellationEdgeFactor(p2, p0) + + TessellationEdgeFactor(p0, p1)) * (1 / 3.0); + return f; + } + + [UNITY_domain("tri")] + [UNITY_outputcontrolpoints(3)] + [UNITY_outputtopology("triangle_cw")] + [UNITY_partitioning("fractional_odd")] + [UNITY_patchconstantfunc("poiPatchConst")] + TessellationControlPoint poiHull( + InputPatch < TessellationControlPoint, 3 > patch, + uint id: SV_OutputControlPointID + ) + { + return patch[id]; + } + + [UNITY_domain("tri")] + v2f poiDomain( + TessellationFactors factors, + OutputPatch < TessellationControlPoint, 3 > patch, + float3 barycentricCoordinates: SV_DomainLocation + ) + { + appdata data; + + #define MY_DOMAIN_PROGRAM_INTERPOLATE(fieldName) data.fieldName = patch[0].fieldName * barycentricCoordinates.x + patch[1].fieldName * barycentricCoordinates.y + patch[2].fieldName * barycentricCoordinates.z; + + MY_DOMAIN_PROGRAM_INTERPOLATE(vertex) + float3 pp[3]; + for (int i = 0; i < 3; ++ i) + { + pp[i] = data.vertex.xyz - patch[i].normal * (dot(data.vertex.xyz, patch[i].normal) - dot(patch[i].vertex.xyz, patch[i].normal)); + } + data.vertex.xyz = _TessellationPhongStrength * (pp[0] * barycentricCoordinates.x + pp[1] * barycentricCoordinates.y + pp[2] * barycentricCoordinates.z) + (1.0f - _TessellationPhongStrength) * data.vertex.xyz; + MY_DOMAIN_PROGRAM_INTERPOLATE(normal) + data.vertex.xyz += data.normal.xyz * _TessellationExtrusionAmount; + MY_DOMAIN_PROGRAM_INTERPOLATE(tangent) + MY_DOMAIN_PROGRAM_INTERPOLATE(color) + MY_DOMAIN_PROGRAM_INTERPOLATE(uv0) + MY_DOMAIN_PROGRAM_INTERPOLATE(uv1) + MY_DOMAIN_PROGRAM_INTERPOLATE(uv2) + MY_DOMAIN_PROGRAM_INTERPOLATE(uv3) + + return vert(data); + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiTessellation.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiTessellation.cginc.meta new file mode 100644 index 00000000..3af22521 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiTessellation.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ed2131b961f2ad84c8b269da26edd9b5 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiUVDistortion.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiUVDistortion.cginc new file mode 100644 index 00000000..0daef159 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiUVDistortion.cginc @@ -0,0 +1,53 @@ +#ifndef POI_UV_DISTORTION + #define POI_UV_DISTORTION + + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_DistortionFlowTexture); float4 _DistortionFlowTexture_ST; + #endif + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_DistortionFlowTexture1); float4 _DistortionFlowTexture1_ST; + #endif + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_DistortionMask); + #endif + + float _DistortionStrength; + float _DistortionStrength1; + float2 _DistortionSpeed; + float2 _DistortionSpeed1; + + float2 getTorusUv(float2 uv) + { + // translated to hlsl from https://www.shadertoy.com/view/Md3Bz7 + // http://web.cs.ucdavis.edu/~amenta/s12/findnorm.pdf + float phi = 6.28318530718f * uv.x; + float theta = 6.28318530718f * uv.y; + float3 c = cos(float3(phi, phi + 1.57079632679f, theta)); + float2 result = float2(c.x * c.z, -c.y * c.z); + return result * 0.5 + 0.5; + } + + float2 calculateDistortionUV(float2 uv) + { + #if defined(PROP_DISTORTIONFLOWTEXTURE) || !defined(OPTIMIZER_ENABLED) + float4 flowVector = UNITY_SAMPLE_TEX2D_SAMPLER(_DistortionFlowTexture, _MainTex, TRANSFORM_TEX(poiMesh.uv[0], _DistortionFlowTexture) + _Time.x * float4(0.5,0.5,0,0)) * 2 - 1; + #else + float4 flowVector = 0; + #endif + #if defined(PROP_DISTORTIONFLOWTEXTURE1) || !defined(OPTIMIZER_ENABLED) + float4 flowVector1 = UNITY_SAMPLE_TEX2D_SAMPLER(_DistortionFlowTexture1, _MainTex, TRANSFORM_TEX(poiMesh.uv[0], _DistortionFlowTexture1) + _Time.x * float4(0.5,0.5,0,0)) * 2 - 1; + #else + float4 flowVector1 = 0; + #endif + #if defined(PROP_DISTORTIONMASK) || !defined(OPTIMIZER_ENABLED) + half distortionMask = POI2D_SAMPLER_PAN(_DistortionMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + half distortionMask = 1; + #endif + + flowVector *= float(0.5); + flowVector1 *= float(0.5); + return uv + ((flowVector.xy + flowVector1.xy) / 2) * distortionMask; + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiUVDistortion.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiUVDistortion.cginc.meta new file mode 100644 index 00000000..71451e68 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiUVDistortion.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 79e59cbd462cbe44897eb957ee3e66ca +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiV2F.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiV2F.cginc new file mode 100644 index 00000000..0e29a179 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiV2F.cginc @@ -0,0 +1,34 @@ +#ifndef POI_V2F + #define POI_V2F + + struct v2f + { + float4 pos: SV_POSITION; + float4 uv0: TEXCOORD0; + float4 uv1: TEXCOORD1; + float3 normal: TEXCOORD2; + float3 tangentViewDir: TEXCOORD3; + float4 tangent: TEXCOORD4; + float4 worldPos: TEXCOORD5; + float4 localPos: TEXCOORD6; + float4 grabPos: TEXCOORD7; + float3 barycentricCoordinates: TEXCOORD8; + #if defined(GRAIN) + float4 worldDirection: TEXCOORD9; + #endif + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + float4 lightmapUV: TEXCOORD10; + #endif + float3 modelPos: TEXCOORD11; + float angleAlpha: TEXCOORD12; + float4 vertexColor: TEXCOORD14; + #ifdef FUR + float furAlpha: TEXCOORD15; + #endif + UNITY_SHADOW_COORDS(16) + UNITY_FOG_COORDS(17) + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiV2F.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiV2F.cginc.meta new file mode 100644 index 00000000..f3faa5a7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiV2F.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0b1f6b9af45dc9148955d907258aeda5 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVert.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVert.cginc new file mode 100644 index 00000000..a2486f3b --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVert.cginc @@ -0,0 +1,137 @@ +#ifndef POI_VERT +#define POI_VERT + +float _VertexManipulationHeightUV; +float _VertexUnwrap; + +#define PM UNITY_MATRIX_P + +inline float4 CalculateFrustumCorrection() +{ + float x1 = -PM._31 / (PM._11 * PM._34); + float x2 = -PM._32 / (PM._22 * PM._34); + return float4(x1, x2, 0, PM._33 / PM._34 + x1 * PM._13 + x2 * PM._23); +} + +v2f vert(appdata v) +{ + UNITY_SETUP_INSTANCE_ID(v); + v2f o; + + #ifdef _COLOROVERLAY_ON + v.vertex.xyz = lerp(v.vertex.xyz, float3(v.uv0.x - .5, v.uv0.y - .5, 0), float(0)); + #endif + + #ifdef RALIV_PENETRATION + applyRalivDynamicOrifaceSystem(v); + #endif + + #ifdef AUTO_EXPOSURE + applyLocalVertexTransformation(v.normal, v.tangent, v.vertex); + #endif + + + UNITY_INITIALIZE_OUTPUT(v2f, o); + UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + + #ifdef _REQUIRE_UV2 //POI_MIRROR + applyMirrorRenderVert(v.vertex); + #endif + + TANGENT_SPACE_ROTATION; + o.localPos = v.vertex; + o.worldPos = mul(unity_ObjectToWorld, o.localPos); + o.normal = UnityObjectToWorldNormal(v.normal); + + #ifdef RALIV_PENETRATION + applyRalivDynamicPenetrationSystem(o.localPos.rgb, o.normal.rgb, v); + #endif + + //o.localPos.x *= -1; + //o.localPos.xz += sin(o.localPos.y * 100 + _Time.y * 5) * .0025; + + float2 uvToUse = 0; + + if (float(0) == 0) + { + uvToUse = v.uv0.xy; + } + + if (float(0) == 1) + { + uvToUse = v.uv1.xy; + } + + if (float(0) == 2) + { + uvToUse = v.uv2.xy; + } + + if (float(0) == 3) + { + uvToUse = v.uv3.xy; + } + #ifdef AUTO_EXPOSURE + applyWorldVertexTransformation(o.worldPos, o.localPos, o.normal, uvToUse); + #endif + applyVertexGlitching(o.worldPos, o.localPos); + applySpawnInVert(o.worldPos, o.localPos, v.uv0.xy); + #ifdef AUTO_EXPOSURE + applyVertexRounding(o.worldPos, o.localPos); + #endif + o.pos = UnityObjectToClipPos(o.localPos); + o.grabPos = ComputeGrabScreenPos(o.pos); + o.uv0.xy = v.uv0.xy; + o.uv0.zw = v.uv1.xy; + o.uv1.xy = v.uv2.xy; + o.uv1.zw = v.uv3.xy; + o.vertexColor = v.color; + o.modelPos = mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + o.tangent = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); + + #ifdef POI_BULGE + bulgyWolgy(o); + #endif + + + o.angleAlpha = 1; + #ifdef _SUNDISK_NONE //POI_RANDOM + o.angleAlpha = ApplyAngleBasedRendering(o.modelPos, o.worldPos); + #endif + + #if defined(LIGHTMAP_ON) + o.lightmapUV.xy = v.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; + #endif + #ifdef DYNAMICLIGHTMAP_ON + o.lightmapUV.zw = v.uv2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + UNITY_TRANSFER_SHADOW(o, o.uv0.xy); + UNITY_TRANSFER_FOG(o, o.pos); + + v.tangent.xyz = normalize(v.tangent.xyz); + v.normal = normalize(v.normal); + float3x3 objectToTangent = float3x3( + v.tangent.xyz, + cross(v.normal, v.tangent.xyz) * v.tangent.w, + v.normal + ); + o.tangentViewDir = mul(objectToTangent, ObjSpaceViewDir(v.vertex)); + + #ifdef POI_META_PASS + o.pos = UnityMetaVertexPosition(v.vertex, v.uv1.xy, v.uv2.xy, unity_LightmapST, unity_DynamicLightmapST); + #endif + + #if defined(GRAIN) + float4 worldDirection; + + worldDirection.xyz = o.worldPos.xyz - _WorldSpaceCameraPos; + worldDirection.w = dot(o.pos, CalculateFrustumCorrection()); + o.worldDirection = worldDirection; + #endif + + return o; +} +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVert.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVert.cginc.meta new file mode 100644 index 00000000..2c292833 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVert.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f973b483b2cdd7540a9124a6f7dfeffa +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVertexManipulations.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVertexManipulations.cginc new file mode 100644 index 00000000..1de2c191 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVertexManipulations.cginc @@ -0,0 +1,102 @@ +#ifndef POI_VERTEX_MANIPULATION + #define POI_VERTEX_MANIPULATION + + #include "CGI_PoiMath.cginc" + + float4 _VertexManipulationLocalTranslation; + float4 _VertexManipulationLocalRotation; + float4 _VertexManipulationLocalScale; + float4 _VertexManipulationWorldTranslation; + + float _VertexManipulationHeight; + float _VertexManipulationHeightBias; + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + sampler2D _VertexManipulationHeightMask; float4 _VertexManipulationHeightMask_ST; + #endif + float2 _VertexManipulationHeightPan; + + + //Vertex Glitching + float _EnableVertexGlitch; + float _VertexGlitchThreshold; + float _VertexGlitchFrequency; + float _VertexGlitchStrength; + // Rounding + float _VertexRoundingDivision; + float _VertexRoundingEnabled; + + void applyLocalVertexTransformation(inout float3 normal, inout float4 tangent, inout float4 vertex) + { + normal = rotate_with_quaternion(normal, float4(0,0,0,1).xyz); + tangent.xyz = rotate_with_quaternion(tangent.xyz, float4(0,0,0,1).xyz); + vertex = transform(vertex, float4(0,0,0,1), float4(0,0,0,1), float4(1,1,1,1)); + + //vertex = float4(vertex.x + sin(_Time.y*1.5 + vertex.y * 50) * .75 * smoothstep( .3, -1, vertex.y), vertex.y, vertex.z + cos(_Time.y*1.5 + vertex.y * 50) * .75 * smoothstep( .3, -1, vertex.y), 1); + } + + void applyLocalVertexTransformation(inout float3 normal, inout float4 vertex) + { + normal = rotate_with_quaternion(normal, float4(0,0,0,1).xyz); + vertex = transform(vertex, float4(0,0,0,1), float4(0,0,0,1), float4(1,1,1,1)); + + //vertex = float4(vertex.x + sin(_Time.y*1.5 + vertex.y * 50) * .75 * smoothstep( .3, -1, vertex.y), vertex.y, vertex.z + cos(_Time.y*1.5 + vertex.y * 50) * .75 * smoothstep( .3, -1, vertex.y), 1); + } + + void applyWorldVertexTransformation(inout float4 worldPos, inout float4 localPos, inout float3 worldNormal, float2 uv) + { + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(TRANSFORM_TEX(uv, _VertexManipulationHeightMask) + float4(0,0,0,0) * _Time.x, 0, 0)).r - float(0)) * float(0) * worldNormal; + #else + float3 heightOffset = float(0) * worldNormal; + #endif + worldPos.rgb += float4(0,0,0,1).xyz/* * float4(0,0,0,1).w*/ + heightOffset; + localPos.xyz = mul(unity_WorldToObject, worldPos).xyz; + } + + void applyWorldVertexTransformationShadow(inout float4 worldPos, inout float4 localPos, float3 worldNormal, float2 uv) + { + #if defined(PROP_VERTEXMANIPULATIONHEIGHTMASK) || !defined(OPTIMIZER_ENABLED) + float3 heightOffset = (tex2Dlod(_VertexManipulationHeightMask, float4(TRANSFORM_TEX(uv, _VertexManipulationHeightMask) + float4(0,0,0,0) * _Time.x, 0, 0)).r - float(0)) * float(0) * worldNormal; + #else + float3 heightOffset = float(0) * worldNormal; + #endif + worldPos.rgb += float4(0,0,0,1).xyz/* * float4(0,0,0,1).w*/ + heightOffset; + localPos.xyz = mul(unity_WorldToObject, worldPos).xyz; + } + + void applyVertexRounding(inout float4 worldPos, inout float4 localPos) + { + + if (float(0)) + { + worldPos.xyz = (ceil(worldPos.xyz * float(500)) / float(500)) - 1 / float(500) * .5; + localPos = mul(unity_WorldToObject, worldPos); + } + } + + void applyVertexGlitching(inout float4 worldPos, inout float4 localPos) + { + + if(float(0)) + { + float3 forward = getCameraPosition() - mul(unity_ObjectToWorld, float4(0, 0, 0, 1)).xyz; + forward.y = 0; + forward = normalize(forward); + float3 glitchDirection = normalize(cross(float3(0, 1, 0), forward)); + float glitchAmount = frac(sin(dot(_Time.xy + worldPos.y, float2(12.9898, 78.233))) * 43758.5453123) * 2 - 1; + /* + float uvl = worldPos.y * _VertexGlitchDensity + _Time.x * _VertexGlitchMapPanSpeed; + float uvr = worldPos.y * _VertexGlitchDensity - _Time.x * _VertexGlitchMapPanSpeed; + float glitchAmountLeft = tex2Dlod(_VertexGlitchMap, float4(uvl, uvl, 0, 0)).r; + float glitchAmountRight = -tex2Dlod(_VertexGlitchMap, float4(uvr, uvr, 0, 0)).r; + float glitchAmount = glitchAmountLeft + glitchAmountRight; + */ + float time = _Time.y * float(0); + float randomGlitch = (sin(time) + sin(2.2 * time + 5.52) + sin(2.9 * time + 0.93) + sin(4.6 * time + 8.94)) / 4; + worldPos.xyz += glitchAmount * glitchDirection * (float(1) * .01) * step(float(1), randomGlitch); + localPos = mul(unity_WorldToObject, worldPos); + } + } + +#endif +// diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVertexManipulations.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVertexManipulations.cginc.meta new file mode 100644 index 00000000..97be7df6 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVertexManipulations.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b3614c126b429b94dbde45a2b2b0cb22 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVideo.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVideo.cginc new file mode 100644 index 00000000..b6739cd9 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVideo.cginc @@ -0,0 +1,297 @@ +#ifndef POI_VIDEO + #define POI_VIDEO + + #if defined(PROP_VIDEOPIXELTEXTURE) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_VideoPixelTexture); float4 _VideoPixelTexture_ST; + #endif + #if defined(PROP_VIDEOMASKTEXTURE) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_VideoMaskTexture); float4 _VideoMaskTexture_ST; + #endif + #if defined(PROP_VIDEOGAMEBOYRAMP) || !defined(OPTIMIZER_ENABLED) + sampler2D _VideoGameboyRamp; + #endif + #if defined(PROP_VIDEODEBUGTEXTURE) || !defined(OPTIMIZER_ENABLED) + UNITY_DECLARE_TEX2D_NOSAMPLER(_VideoDebugTexture); float4 _VideoDebugTexture_ST; + #endif + + float _VideoUVNumber; + float _VideoType; + float3 pixels; + float2 _VideoResolution; + half _VideoBacklight; + half _VideoCRTRefreshRate; + half _VideoCRTPixelEnergizedTime; + half _VideoEnableVideoPlayer; + half _VideoRepeatVideoTexture; + half _VideoPixelateToResolution; + float2 _VideoMaskPanning; + float _VideoEmissionEnabled; + // Video Settings + half _VideoSaturation; + half _VideoContrast; + float2 _VideoTiling; + float2 _VideoOffset; + float2 _VideoPanning; + + //Debug + half _VideoEnableDebug; + + + + sampler2D _VRChat_VideoPlayer; + float4 _VRChat_VideoPlayer_TexelSize; + + float4 globalVideoPlayerColor; + float3 globalColorToDisplayOnScreen; + float globalVideoOn; + + float3 applyBacklight(float3 albedo, half backlightStrength) + { + return max(backlightStrength, albedo.rgb); + } + + float3 applyViewAngleTN(float3 albedo) + { + float3 reflectionVector = normalize(reflect(poiCam.viewDir.rgb, poiMesh.normals[1].rgb)); + float upwardShift = dot(reflectionVector, poiMesh.binormal); + upwardShift = pow(upwardShift, 1); + float sideShift = dot(reflectionVector, poiMesh.tangent); + sideShift *= pow(sideShift, 3); + #if !UNITY_COLORSPACE_GAMMA + albedo = LinearToGammaSpace(albedo); + #endif + albedo = saturate(lerp(half3(0.5, 0.5, 0.5), albedo, upwardShift + 1)); + #if !UNITY_COLORSPACE_GAMMA + albedo = GammaToLinearSpace(albedo); + #endif + albedo = (lerp(albedo, albedo.gbr, sideShift)); + return albedo; + } + + float calculateCRTPixelBrightness() + { + float totalPixels = float4(1280,720,0,1).x * float4(1280,720,0,1).y; + float2 uvPixel = float2((floor((1 - poiMesh.uv[float(0)].y) * float4(1280,720,0,1).y)) / float4(1280,720,0,1).y, (floor(poiMesh.uv[float(0)].x * float4(1280,720,0,1).x)) / float4(1280,720,0,1).x); + float currentPixelNumber = float4(1280,720,0,1).x * (float4(1280,720,0,1).y * uvPixel.x) + float4(1280,720,0,1).y * uvPixel.y; + float currentPixelAlpha = currentPixelNumber / totalPixels; + half electronBeamAlpha = frac(_Time.y * float(24)); + float electronBeamPixelNumber = totalPixels * electronBeamAlpha; + + float DistanceInPixelsFromCurrentElectronBeamPixel = 0; + if (electronBeamPixelNumber >= currentPixelNumber) + { + DistanceInPixelsFromCurrentElectronBeamPixel = electronBeamPixelNumber - currentPixelNumber; + } + else + { + DistanceInPixelsFromCurrentElectronBeamPixel = electronBeamPixelNumber + (totalPixels - currentPixelNumber); + } + float CRTFrameTime = 1 / float(24); + float timeSincecurrentPixelWasHitByElectronBeam = (DistanceInPixelsFromCurrentElectronBeamPixel / totalPixels); + + return saturate(float(1.9) - timeSincecurrentPixelWasHitByElectronBeam); + } + + void applyContrastSettings(inout float3 pixel) + { + #if !UNITY_COLORSPACE_GAMMA + pixel = LinearToGammaSpace(pixel); + #endif + pixel = saturate(lerp(half3(0.5, 0.5, 0.5), pixel, float(0) + 1)); + #if !UNITY_COLORSPACE_GAMMA + pixel = GammaToLinearSpace(pixel); + #endif + } + + void applySaturationSettings(inout float3 pixel) + { + pixel = lerp(pixel.rgb, dot(pixel.rgb, float3(0.3, 0.59, 0.11)), -float(0)); + } + + void applyVideoSettings(inout float3 pixel) + { + applySaturationSettings(pixel); + applyContrastSettings(pixel); + } + + void calculateLCD(inout float4 albedo) + { + + if(float(0) == 0) + { + globalColorToDisplayOnScreen = albedo; + } + globalColorToDisplayOnScreen = applyBacklight(globalColorToDisplayOnScreen, float(1) * .01); + applyVideoSettings(globalColorToDisplayOnScreen); + albedo.rgb = globalColorToDisplayOnScreen * pixels * float(1) + albedo * .000001; + } + void calculateTN(inout float4 albedo) + { + if(float(0) == 0) + { + globalColorToDisplayOnScreen = albedo; + } + globalColorToDisplayOnScreen = applyBacklight(globalColorToDisplayOnScreen, float(1) * .01); + globalColorToDisplayOnScreen = applyViewAngleTN(globalColorToDisplayOnScreen); + applyVideoSettings(globalColorToDisplayOnScreen); + albedo.rgb = globalColorToDisplayOnScreen * pixels * float(1) + albedo * .000001; + } + void calculateCRT(inout float4 albedo) + { + + if(float(0) == 0) + { + globalColorToDisplayOnScreen = albedo; + } + float brightness = calculateCRTPixelBrightness(); + applyVideoSettings(globalColorToDisplayOnScreen); + albedo.rgb = globalColorToDisplayOnScreen * pixels * brightness * float(1) + albedo * .000001; + } + void calculateOLED(inout float4 albedo) + { + + if(float(0) == 0) + { + globalColorToDisplayOnScreen = albedo; + } + applyVideoSettings(globalColorToDisplayOnScreen); + albedo.rgb = globalColorToDisplayOnScreen * pixels * float(1) + albedo * .000001; + } + void calculateGameboy(inout float4 albedo) + { + + if(float(0) == 0) + { + globalColorToDisplayOnScreen = albedo; + } + applyVideoSettings(globalColorToDisplayOnScreen); + half brightness = saturate((globalColorToDisplayOnScreen.r + globalColorToDisplayOnScreen.g + globalColorToDisplayOnScreen.b) * .3333333); + #if defined(PROP_VIDEOGAMEBOYRAMP) || !defined(OPTIMIZER_ENABLED) + albedo.rgb = tex2D(_VideoGameboyRamp, brightness); + #endif + } + void calculateProjector(inout float4 albedo) + { + + if(float(0) == 0) + { + globalColorToDisplayOnScreen = albedo; + } + applyVideoSettings(globalColorToDisplayOnScreen); + + float3 projectorColor = albedo * globalColorToDisplayOnScreen * float(1); + albedo.r = clamp(projectorColor.r, albedo.r, 1000); + albedo.g = clamp(projectorColor.g, albedo.g, 1000); + albedo.b = clamp(projectorColor.b, albedo.b, 1000); + } + + void applyScreenEffect(inout float4 albedo, inout float3 videoEmission) + { + float4 albedoBeforeScreen = albedo; + #if defined(PROP_VIDEOPIXELTEXTURE) || !defined(OPTIMIZER_ENABLED) + pixels = UNITY_SAMPLE_TEX2D_SAMPLER(_VideoPixelTexture, _MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _VideoPixelTexture) * float4(1280,720,0,1)); + #else + pixels = 1; + #endif + globalVideoOn = 0; + + if(float(0) == 1) + { + float4 videoTexture = 0; + + if(float(0)) + { + + if(float(0)) + { + #if defined(PROP_VIDEODEBUGTEXTURE) || !defined(OPTIMIZER_ENABLED) + videoTexture = UNITY_SAMPLE_TEX2D_SAMPLER(_VideoDebugTexture, _MainTex, round(TRANSFORM_TEX(poiMesh.uv[float(0)], _VideoDebugTexture) * float4(1280,720,0,1) + .5) / float4(1280,720,0,1)); + #else + videoTexture = 1; + #endif + } + else + { + videoTexture = tex2D(_VRChat_VideoPlayer, round(poiMesh.uv[float(0)] * float4(1280,720,0,1) + .5) / float4(1280,720,0,1)); + } + } + else + { + + if(float(0)) + { + #if defined(PROP_VIDEODEBUGTEXTURE) || !defined(OPTIMIZER_ENABLED) + videoTexture = UNITY_SAMPLE_TEX2D_SAMPLER(_VideoDebugTexture, _MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _VideoDebugTexture) * float4(1,1,0,0) + float4(0,0,0,0)); + #else + videoTexture = 1; + #endif + } + else + { + videoTexture = tex2D(_VRChat_VideoPlayer, ((poiMesh.uv[float(0)] + _Time.x * float4(0,0,0,0)) * float4(1,1,0,0)) + float4(0,0,0,0)); + } + } + if(videoTexture.a == 1) + { + globalColorToDisplayOnScreen = videoTexture.rgb; + globalVideoOn = 1; + } + } + + + if(float(0) == 1) + { + if(poiMesh.uv[float(0)].x > 1 || poiMesh.uv[float(0)].x < 0 || poiMesh.uv[float(0)].y > 1 || poiMesh.uv[float(0)].y < 0) + { + return; + } + } + + switch(float(3)) + { + case 0: // LCD + { + calculateLCD(albedo); + break; + } + case 1: // TN + { + calculateTN(albedo); + break; + } + case 2: // CRT + { + calculateCRT(albedo); + break; + } + case 3: // OLED + { + calculateOLED(albedo); + break; + } + case 4: // Gameboy + { + calculateGameboy(albedo); + break; + } + case 5: // Projector + { + calculateProjector(albedo); + break; + } + } + #if defined(PROP_VIDEOMASKTEXTURE) || !defined(OPTIMIZER_ENABLED) + float screenMask = UNITY_SAMPLE_TEX2D_SAMPLER(_VideoMaskTexture, _MainTex, TRANSFORM_TEX(poiMesh.uv[float(0)], _VideoMaskTexture) + _Time.x * float4(0,0,0,0)); + #else + float screenMask = 1; + #endif + + albedo = lerp(albedoBeforeScreen, albedo, screenMask); + + if (float(1)) + { + videoEmission = albedo.rgb * screenMask; + } + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVideo.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVideo.cginc.meta new file mode 100644 index 00000000..8ad68f0c --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVideo.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 615cc5ba176e4ca459e36400324d02ad +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVoronoi.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVoronoi.cginc new file mode 100644 index 00000000..90f22caa --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVoronoi.cginc @@ -0,0 +1,312 @@ +#ifndef POI_VORONOI + #define POI_VORONOI + + float _VoronoiSpace; + float _VoronoiBlend; + float _VoronoiType; + float4 _VoronoiColor0; + float _VoronoiEmission0; + float4 _VoronoiColor1; + float _VoronoiEmission1; + float2 _VoronoiGradient; + float _VoronoiScale; + float3 _VoronoiSpeed; + float _VoronoiEnableRandomCellColor; + float2 _VoronoiRandomMinMaxSaturation; + float2 _VoronoiRandomMinMaxBrightness; + float3 randomPoint; + float _VoronoiEffectsMaterialAlpha; + + #if defined(PROP_VORONOIMASK) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_VoronoiMask); + #endif + #if defined(PROP_VORONOINOISE) || !defined(OPTIMIZER_ENABLED) + POI_TEXTURE_NOSAMPLER(_VoronoiNoise); + #endif + float _VoronoiNoiseIntensity; + + float2 inoise(float3 P, float jitter) + { + float3 Pi = mod(floor(P), 289.0); + float3 Pf = frac(P); + float3 oi = float3(-1.0, 0.0, 1.0); + float3 of = float3(-0.5, 0.5, 1.5); + float3 px = Permutation(Pi.x + oi); + float3 py = Permutation(Pi.y + oi); + + float3 p, ox, oy, oz, dx, dy, dz; + float2 F = 1e6; + + for (int i = 0; i < 3; i ++) + { + for (int j = 0; j < 3; j ++) + { + p = Permutation(px[i] + py[j] + Pi.z + oi); // pij1, pij2, pij3 + + ox = frac(p * K) - Ko; + oy = mod(floor(p * K), 7.0) * K - Ko; + + p = Permutation(p); + + oz = frac(p * K) - Ko; + + dx = Pf.x - of[i] + jitter * ox; + dy = Pf.y - of[j] + jitter * oy; + dz = Pf.z - of + jitter * oz; + + float3 d = dx * dx + dy * dy + dz * dz; // dij1, dij2 and dij3, squared + + //Find lowest and second lowest distances + for (int n = 0; n < 3; n ++) + { + if (d[n] < F[0]) + { + F[1] = F[0]; + F[0] = d[n]; + randomPoint = p; + } + else if(d[n] < F[1]) + { + F[1] = d[n]; + } + } + } + } + + return F; + } + + float voronoi2D(in float2 x, float scale, float2 speed) + { + x *= scale; + x += speed * _Time.x; + float2 n = floor(x); + float2 f = frac(x); + + // first pass: regular voronoi + float2 mg, mr; + float md = 8.0; + for (int j = -1; j <= 1; j ++) + { + for (int i = -1; i <= 1; i ++) + { + float2 g = float2(float(i), float(j)); + float2 o = random2(n + g); + float2 currentPoint = o; + + float2 r = g + o - f; + float d = dot(r, r); + + if (d < md) + { + md = d; + mr = r; + mg = g; + randomPoint.xy = currentPoint; + } + } + } + + // second pass: distance to borders + md = 8.0; + for (int r = -2; r <= 2; r ++) + { + for (int q = -2; q <= 2; q ++) + { + float2 g = mg + float2(float(q), float(r)); + float2 o = random2(n + g); + + float2 r = g + o - f; + + if (dot(mr - r, mr - r) > 0.00001) + { + md = min(md, dot(0.5 * (mr + r), normalize(r - mr))); + } + } + } + return md; + } + + float voronoi3D(in float3 x, float scale, float3 speed) + { + x *= scale; + x += speed * _Time.x; + float3 n = floor(x); + float3 f = frac(x); + + // first pass: regular voronoi + float3 mg, mr; + float md = 8.0; + for (int j = -1; j <= 1; j ++) + { + for (int i = -1; i <= 1; i ++) + { + for (int h = -1; h <= 1; h ++) + { + float3 g = float3(float(h), float(i), float(j)); + float3 o = random3(n + g); + float3 currentPoint = o; + + float3 r = g + o - f; + float d = dot(r, r); + + if (d < md) + { + md = d; + mr = r; + mg = g; + randomPoint = currentPoint; + } + } + } + } + + // second pass: distance to borders + md = 8.0; + for (int r = -2; r <= 2; r ++) + { + for (int q = -2; q <= 2; q ++) + { + for (int p = -2; p <= 2; p ++) + { + float3 g = mg + float3(float(p), float(q), float(r)); + float3 o = random3(n + g); + + float3 r = g + o - f; + + if (dot(mr - r, mr - r) > 0.00001) + { + md = min(md, dot(0.5 * (mr + r), normalize(r - mr))); + } + } + } + } + return md; + } + + + + // fracal sum, range -1.0 - 1.0 + float VoronoiNoise_Octaves(float3 p, float scale, float3 speed, int octaveNumber, float octaveScale, float octaveAttenuation, float jitter, float time) + { + float freq = scale; + float weight = 1.0f; + float sum = 0; + for (int i = 0; i < octaveNumber; i ++) + { + float2 F = inoise(p * freq + time * speed, jitter) * weight; + + sum += sqrt(F[0]); + + freq *= octaveScale; + weight *= 1.0f - octaveAttenuation; + } + return sum; + } + + float VoronoiNoiseDiff_Octaves(float3 p, float scale, float3 speed, int octaveNumber, float octaveScale, float octaveAttenuation, float jitter, float time) + { + float freq = scale; + float weight = 1.0f; + float sum = 0; + for (int i = 0; i < octaveNumber; i ++) + { + float2 F = inoise(p * freq + time * speed, jitter) * weight; + + sum += sqrt(F[1]) - sqrt(F[0]); + + freq *= octaveScale; + weight *= 1.0f - octaveAttenuation; + } + return sum; + } + + void applyVoronoi(inout float4 finalColor, inout float3 VoronoiEmission) + { + float voronoiOctaveNumber = 1; + float voronoiOctaveScale = 1; + float voronoiOctaveAttenuation = 1; + randomPoint = 0; + float4 voronoiColor1 = float4(1,1,1,1); + + float voronoi = 0; + + float3 position = 0; + + + if (float(0) == 0) + { + position = poiMesh.localPos; + } + + if(float(0) == 1) + { + position = poiMesh.worldPos; + } + + if(float(0) == 2) + { + position = float3(poiMesh.uv[0].x, poiMesh.uv[0].y, 0); + } + #if defined(PROP_VORONOIMASK) || !defined(OPTIMIZER_ENABLED) + float mask = POI2D_SAMPLER_PAN(_VoronoiMask, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r; + #else + float mask = 1; + #endif + #if defined(PROP_VORONOINOISE) || !defined(OPTIMIZER_ENABLED) + float edgeNoise = POI2D_SAMPLER_PAN(_VoronoiNoise, _MainTex, poiMesh.uv[float(0)], float4(0,0,0,0)).r * float(0.1); + #else + float edgeNoise = 0; + #endif + + if(float(1) == 0) // Basic + { + voronoi = voronoi2D(position.xy, float(5), float4(3,3,3,1)); + } + + if (float(1) == 1) // Diff + { + voronoi = VoronoiNoiseDiff_Octaves(position, float(5), float4(3,3,3,1), voronoiOctaveNumber, voronoiOctaveScale, voronoiOctaveAttenuation, 1, _Time.x); + } + + if (float(1) == 2) // Fixed Border + { + voronoi = voronoi3D(position, float(5), float4(3,3,3,1)); + // isolines + //color = c.x * (0.5 + 0.5 * sin(64.0 * c.x)) * 1.0; + } + + if (float(0) == 1) + { + float3 rando = random3(randomPoint); + fixed hue = rando.x; + fixed saturation = lerp(float4(0.8,1,0,1).x, float4(0.8,1,0,1).y, rando.y); + fixed value = lerp(float4(0.8,1,0,1).x, float4(0.8,1,0,1).y, rando.z); + float3 hsv = float3(hue, saturation, value); + + voronoiColor1.rgb = HSVtoRGB(hsv); + } + + float2 voronoiGradient = float4(0.04,0.05,0,0); + voronoiGradient.xy += edgeNoise; + float ramp = smoothstep(voronoiGradient.x, voronoiGradient.y, voronoi); + + + if(float(0) == 0) + { + float4 voronoiColor = lerp(float4(0,0,0,1), voronoiColor1, ramp); + + if(float(0)) + { + finalColor.rgba = lerp(finalColor, voronoiColor, mask); + } + else + { + finalColor.rgb = lerp(finalColor.rgb, voronoiColor.rgb, mask * voronoiColor.a); + } + } + float4 voronoiEmissionColor = lerp(float4(0,0,0,1) * float(0), voronoiColor1 * float(0), ramp); + VoronoiEmission = voronoiEmissionColor.rgb * mask * voronoiEmissionColor.a; + } + +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVoronoi.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVoronoi.cginc.meta new file mode 100644 index 00000000..43878ccd --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiVoronoi.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: af694c470a8534e429fbdd0142b1c5b0 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiWireframe.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiWireframe.cginc new file mode 100644 index 00000000..49c602c0 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiWireframe.cginc @@ -0,0 +1,111 @@ +#ifndef POI_WIREFRAME + #define POI_WIREFRAME + + UNITY_DECLARE_TEX2D_NOSAMPLER(_WireframeTexture); float4 _WireframeTexture_ST; + float2 _WireframeTexturePan; + float _WireframeSmoothing; + float _WireframeThickness; + float4 _WireframeColor; + float _WireframeAlpha; + float _WireframeEnable; + float _WireframeWaveEnabled; + float _WireframeWaveDensity; + float _WireframeWaveSpeed; + float _WireframeEdgeOpacity; + float _WireframeFaceOpacity; + half _WireframeEmissionAlpha; + float _WireframeEmissionStrength; + float _WireframeQuad; + float _WireframeUV; + + #ifndef POI_SHADOW + void applyWireframe(inout float3 wireframeEmission, inout float4 albedo) + { + + if (_WireframeEnable) + { + float4 colorMap = UNITY_SAMPLE_TEX2D_SAMPLER(_WireframeTexture, _MainTex, TRANSFORM_TEX(poiMesh.uv[_WireframeUV], _WireframeTexture) + _Time.x * _WireframeTexturePan); + float size = _WireframeThickness; + half3 width = abs(ddx(poiMesh.barycentricCoordinates)) + abs(ddy(poiMesh.barycentricCoordinates)); + half3 eF = smoothstep(0, width * size, poiMesh.barycentricCoordinates); + half minBary = size > 0 ? min(min(eF.x, eF.y), eF.z): 1; + + float4 wireframeColor = _WireframeColor * colorMap; + + albedo.a *= lerp(_WireframeEdgeOpacity, _WireframeFaceOpacity, minBary); + albedo.rgb = lerp(lerp(albedo.rgb, wireframeColor.rgb, wireframeColor.a), albedo.rgb, minBary); + wireframeEmission = wireframeColor.rgb * _WireframeEmissionStrength * (1 - minBary) * _WireframeColor.a; + } + } + + [maxvertexcount(3)] + void wireframeGeom(triangle v2f IN[3], inout TriangleStream < v2f > tristream) + { + + if(_WireframeQuad) + { + float e1 = length(IN[0].localPos - IN[1].localPos); + float e2 = length(IN[1].localPos - IN[2].localPos); + float e3 = length(IN[2].localPos - IN[0].localPos); + + float3 quad = 0; + if(e1 > e2 && e1 > e3) + quad.y = 1.; + else if(e2 > e3 && e2 > e1) + quad.x = 1; + else + quad.z = 1; + + IN[0].barycentricCoordinates = fixed3(1, 0, 0) + quad; + IN[1].barycentricCoordinates = fixed3(0, 0, 1) + quad; + IN[2].barycentricCoordinates = fixed3(0, 1, 0) + quad; + } + else + { + IN[0].barycentricCoordinates = fixed3(1, 0, 0); + IN[1].barycentricCoordinates = fixed3(0, 1, 0); + IN[2].barycentricCoordinates = fixed3(0, 0, 1); + } + + + + tristream.Append(IN[0]); + tristream.Append(IN[1]); + tristream.Append(IN[2]); + } + #else + + float applyShadowWireframe(float2 uv, float3 barycentricCoordinates, float3 normal, float3 worldPos) + { + + if(_WireframeEnable) + { + float wireframeFadeAlpha = _WireframeAlpha; + float3 finalWireframeColor = 0; + + float3 barys; + barys.xy = barycentricCoordinates; + barys.z = 1 - barys.x - barys.y; + float3 deltas = fwidth(barys); + float3 smoothing = deltas * _WireframeSmoothing; + float wireframeThickness = _WireframeThickness; + float3 thickness = deltas * wireframeThickness; + barys = smoothstep(thickness, thickness + smoothing, barys); + float minBary = min(barys.x, min(barys.y, barys.z)); + + return lerp(_WireframeEdgeOpacity, _WireframeFaceOpacity, minBary); + } + } + + [maxvertexcount(3)] + void wireframeGeom(triangle V2FShadow IN[3], inout TriangleStream < V2FShadow > tristream) + { + IN[0].barycentricCoordinates = fixed3(1, 0, 0); + IN[1].barycentricCoordinates = fixed3(0, 1, 0); + IN[2].barycentricCoordinates = fixed3(0, 0, 1); + tristream.Append(IN[0]); + tristream.Append(IN[1]); + tristream.Append(IN[2]); + } + #endif +#endif diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiWireframe.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiWireframe.cginc.meta new file mode 100644 index 00000000..330ca521 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_PoiWireframe.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 36e1cb267d961774788155ae236e15de +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_Poicludes.cginc b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_Poicludes.cginc new file mode 100644 index 00000000..0cf468e1 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_Poicludes.cginc @@ -0,0 +1,180 @@ +#ifndef POICLUDES +#define POICLUDES + +UNITY_DECLARE_TEX2D(_MainTex); float4 _MainTex_ST; float4 _MainTex_TexelSize; +float _SpecularLMOcclusion; +float _SpecLMOcclusionAdjust; +sampler2D _PoiGrab; +sampler2D _CameraDepthTexture; +float _Cutoff; +float _AlphaMod; + +//Structs +struct appdata +{ + float4 vertex: POSITION; + float3 normal: NORMAL; + float4 tangent: TANGENT; + float4 color: COLOR; + float2 uv0: TEXCOORD0; + float2 uv1: TEXCOORD1; + float2 uv2: TEXCOORD2; + float2 uv3: TEXCOORD3; + uint vertexId: SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +#ifdef OUTLINE + float _LineWidth; + float _OutlineEmission; + float4 _LineColor; + sampler2D _OutlineTexture; float4 _OutlineTexture_ST; float2 _OutlineTexturePan; float _OutlineTextureUV; + float4 _OutlineFadeDistance; + float4 _OutlineGlobalPan; +#endif + +struct PoiLighting +{ + half3 direction; + half3 color; + fixed attenuation; + #ifdef FORWARD_ADD_PASS + fixed additiveShadow; + #endif + half3 directLighting; + half3 indirectLighting; + half lightMap; + float3 rampedLightMap; + half3 finalLighting; + half3 halfDir; + half nDotL; + half nDotH; + half lDotv; + half lDotH; + half nDotV; + half N0DotV; + half diffuseTerm; + half occlusion; + // World normal dot half direction + #ifdef POI_VAR_DOTNH + half dotNH; + #endif + + // Light direction dot half direction + #ifdef POI_VAR_DOTLH + half dotLH; + #endif + + #ifdef VERTEXLIGHT_ON + // Non Important Lights + float4 vDotNL; + float3 vColor[4]; + float4 vCorrectedDotNL; + float4 vAttenuation; + float4 vAttenuationDotNL; + float3 vPosition[4]; + float3 vDirection[4]; + float3 vFinalLighting; + float3 vHalfDir[4]; + half4 vDotNH; + half4 vDotLH; + + + #endif +}; + +struct PoiCamera +{ + half3 viewDir; + half3 tangentViewDir; + half3 decalTangentViewDir; + half3 forwardDir; + half3 worldPos; + float viewDotNormal; + float distanceToModel; + float distanceToVert; + float3 reflectionDir; + float3 vertexReflectionDir; + float2 screenUV; + float4 clipPos; + #if defined(GRAIN) + float4 worldDirection; + #endif + float4 grabPos; +}; + +struct PoiMesh +{ + float3 normals[2]; + float4 tangent; + float3 binormal; + float3 localPos; + float3 worldPos; + float3 modelPos; + float3 tangentSpaceNormal; + float2 uv[5]; + float4 vertexColor; + fixed3 barycentricCoordinates; + #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) + float4 lightmapUV; + #endif + float isFrontFace; + #ifdef FUR + float furAlpha; + #endif +}; + +struct PoiTangentData +{ + float3x3 tangentTransform; + float3x3 tangentToWorld; +}; + +struct FragmentCommonData +{ + half3 diffColor, specColor; + // Note: smoothness & oneMinusReflectivity for optimization purposes, mostly for DX9 SM2.0 level. + // Most of the math is being done on these (1-x) values, and that saves a few precious ALU slots. + half oneMinusReflectivity, smoothness; + float3 normalWorld; + float3 eyeVec; + half alpha; + float3 posWorld; + + #if UNITY_STANDARD_SIMPLE + half3 reflUVW; + #endif + + #if UNITY_STANDARD_SIMPLE + half3 tangentSpaceNormal; + #endif +}; + +struct Debug +{ + float debug1; + float2 debug2; + float3 debug3; + float4 debug4; +}; + +struct PoiMods +{ + float4 audioLink; + fixed audioLinkTextureExists; + float4 globalMasks; + float audioLinkVersion; + float4 audioLinkTexture; +}; + +static Debug debug; +static PoiLighting poiLight; +static PoiCamera poiCam; +static PoiMesh poiMesh; +static PoiMods poiMods; +static UnityGI gi; +static FragmentCommonData s; +static PoiTangentData poiTData; + +#endif + diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_Poicludes.cginc.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_Poicludes.cginc.meta new file mode 100644 index 00000000..86202532 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Includes/CGI_Poicludes.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6d2b1af7872b4ab429c4b1d6bd73f2c8 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Shaders.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Shaders.meta new file mode 100644 index 00000000..57ea7c29 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1175b6393a122154487363b46e7f46bf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Shaders/S_Poiyomi_Pro.shader b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Shaders/S_Poiyomi_Pro.shader new file mode 100644 index 00000000..d7bcc0c7 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Shaders/S_Poiyomi_Pro.shader @@ -0,0 +1,5729 @@ +Shader "Hidden/.poiyomi/★ Poiyomi Pro ★/auri poiyomi pro dps pp2-auri poiyomi pro dps pp2" +{ + Properties + { + [HideInInspector] shader_is_using_thry_editor ("", Float) = 0 + [HideInInspector] shader_master_label ("<color=#000000ff>Poiyomi Pro V7.2.21</color>", Float) = 0 + [HideInInspector] shader_presets ("poiToonPresets", Float) = 0 + [HideInInspector] shader_properties_label_file ("7PlusLabels", Float) = 0 + + [HideInInspector] footer_youtube ("youtube footer button", Float) = 0 + [HideInInspector] footer_twitter ("twitter footer button", Float) = 0 + [HideInInspector] footer_patreon ("patreon footer button", Float) = 0 + [HideInInspector] footer_discord ("discord footer button", Float) = 0 + [HideInInspector] footer_github ("github footer button", Float) = 0 + + // Keyword to remind users in the VRChat SDK that this material hasn't been locked. Inelegant but it works. + [HideInInspector] _ForgotToLockMaterial (";;YOU_FORGOT_TO_LOCK_THIS_MATERIAL;", Int) = 1 + [ThryShaderOptimizerLockButton] _ShaderOptimizerEnabled ("", Int) = 0 + [Helpbox(1)] _LockTooltip ("Animations don't work by default when locked in. Right click a property if you want to animate it. The shader will lock in automatically at upload time.", Int) = 0 + + [ThryWideEnum(Opaque, 0, Cutout, 1, TransClipping, 9, Fade, 2, Transparent, 3, Additive, 4, Soft Additive, 5, Multiplicative, 6, 2x Multiplicative, 7, Multiplicative Grab Pass, 8)]_Mode("Rendering Preset--{on_value_actions:[ + {value:0,actions:[{type:SET_PROPERTY,data:render_queue=2000}, {type:SET_PROPERTY,data:render_type=Opaque}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:1,actions:[{type:SET_PROPERTY,data:render_queue=2460}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=.5}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=1}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:9,actions:[{type:SET_PROPERTY,data:render_queue=2460}, {type:SET_PROPERTY,data:render_type=TransparentCutout}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:2,actions:[{type:SET_PROPERTY,data:render_queue=3010}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=5}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:3,actions:[{type:SET_PROPERTY,data:render_queue=3010}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=10}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=1}]}, + {value:4,actions:[{type:SET_PROPERTY,data:render_queue=3010}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:5,actions:[{type:SET_PROPERTY,data:render_queue=3010}, {type:SET_PROPERTY,data:RenderType=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=4}, {type:SET_PROPERTY,data:_DstBlend=1}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:6,actions:[{type:SET_PROPERTY,data:render_queue=3010}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:7,actions:[{type:SET_PROPERTY,data:render_queue=3010}, {type:SET_PROPERTY,data:render_type=Transparent}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=2}, {type:SET_PROPERTY,data:_DstBlend=3}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=0}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]}, + {value:8,actions:[{type:SET_PROPERTY,data:render_queue=3010}, {type:SET_PROPERTY,data:render_type=Opaque}, {type:SET_PROPERTY,data:_BlendOp=0}, {type:SET_PROPERTY,data:_BlendOpAlpha=0}, {type:SET_PROPERTY,data:_Cutoff=0}, {type:SET_PROPERTY,data:_SrcBlend=1}, {type:SET_PROPERTY,data:_DstBlend=0}, {type:SET_PROPERTY,data:_AlphaToMask=0}, {type:SET_PROPERTY,data:_ZWrite=1}, {type:SET_PROPERTY,data:_ZTest=4}, {type:SET_PROPERTY,data:_AlphaPremultiply=0}]} + }]}]}", Int) = 0 + + // Main + [HideInInspector] m_mainOptions ("Main", Float) = 0 + _Color ("Color & Alpha", Color) = (1, 1, 1, 1) + _MainTex ("Texture", 2D) = "white" { } + [HideInInspector][Vector2]_MainTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _MainTextureUV ("UV", Int) = 0 + _MainEmissionStrength ("Basic Emission", Range(0, 20)) = 0 + [Normal]_BumpMap ("Normal Map", 2D) = "bump" { } + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _BumpMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_BumpMapPan ("Panning", Vector) = (0, 0, 0, 0) + _BumpScale ("Normal Intensity", Range(0, 10)) = 1 + _ClippingMask ("Alpha Map--{reference_properties:[_ClippingMaskPan, _ClippingMaskUV, _Inverse_Clipping]}", 2D) = "white" { } + [HideInInspector][Vector2]_ClippingMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _ClippingMaskUV ("UV", Int) = 0 + [ToggleUI]_Inverse_Clipping ("Invert", Float) = 0 + + //Hue Shifting + [HideInInspector] m_start_MainHueShift ("Color Adjust", Float) = 0 + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _MainColorAdjustTextureUV ("UV", Int) = 0 + [ToggleUI]_MainHueShiftReplace ("Hue Replace?", Float) = 1 + _MainHueShift ("Hue Shift", Range(0, 1)) = 0 + _MainHueShiftSpeed ("Hue Shift Speed", Float) = 0 + _Saturation ("Saturation", Range(-1, 10)) = 0 + _MainBrightness("Brightness", Range(-1,1)) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_HDR)]_MainHueShiftToggle ("Toggle Hueshift", Float) = 0 + _MainColorAdjustTexture ("Mask R(H) G(S) B(B)--{reference_properties:[_MainColorAdjustTexturePan, _MainColorAdjustTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_MainColorAdjustTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_MainHueShift ("Hue Shift", Float) = 0 + + // RGB Masking + [HideInInspector] m_start_RGBMask ("RGB Color Masking", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE)]_RGBMaskEnabled ("RGB Mask Enabled", Float) = 0 + [ToggleUI]_RGBUseVertexColors ("Use Vertex Colors", Float) = 0 + [ToggleUI]_RGBBlendMultiplicative ("Multiplicative?", Float) = 0 + _RGBMask ("Mask", 2D) = "white" { } + [HideInInspector][Vector2]_RGBMaskPanning ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)]_RGBMaskUV ("UV", int) = 0 + _RedColor ("R Color", Color) = (1, 1, 1, 1) + _RedTexure ("R Texture", 2D) = "white" { } + [HideInInspector][Vector2]_RGBRedPanning ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)]_RGBRed_UV ("UV", int) = 0 + _GreenColor ("G Color", Color) = (1, 1, 1, 1) + _GreenTexture ("G Texture", 2D) = "white" { } + [HideInInspector][Vector2]_RGBGreenPanning ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)]_RGBGreen_UV ("UV", int) = 0 + _BlueColor ("B Color", Color) = (1, 1, 1, 1) + _BlueTexture ("B Texture", 2D) = "white" { } + [HideInInspector][Vector2]_RGBBluePanning ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)]_RGBBlue_UV ("UV", int) = 0 + + // RGB MASKED NORMALS + [ThryToggle(GEOM_TYPE_MESH)]_RgbNormalsEnabled ("Enable Normals", Float) = 0 + [ToggleUI]_RGBNormalBlend ("Blend with Base--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Float) = 0 + [Normal]_RgbNormalR ("R Normal--{reference_properties:[_RgbNormalRPan, _RgbNormalRUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector]_RgbNormalRPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)]_RgbNormalRUV ("UV", int) = 0 + _RgbNormalRScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0,10)) = 0 + [Normal]_RgbNormalG ("G Normal--{reference_properties:[_RgbNormalGPan, _RgbNormalGUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector]_RgbNormalGPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)]_RgbNormalGUV ("UV", int) = 0 + _RgbNormalGScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0,10)) = 0 + [Normal]_RgbNormalB ("B Normal--{reference_properties:[_RgbNormalBPan, _RgbNormalBUV],condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", 2D) = "bump" { } + [HideInInspector]_RgbNormalBPan ("Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)]_RgbNormalBUV ("UV", int) = 0 + _RgbNormalBScale ("Intensity--{condition_show:{type:PROPERTY_BOOL,data:_RgbNormalsEnabled==1}}", Range(0,10)) = 0 + [HideInInspector] m_end_RGBMask ("RGB Color Masking", Float) = 0 + + // Detail Options + [HideInInspector] m_start_DetailOptions ("Details--{reference_property:_DetailEnabled, button_right:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=9oIcQln9of4&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube},is_hideable:true}", Float) = 0 + [HideInInspector][ThryToggle(FINALPASS)]_DetailEnabled ("Enable", Float) = 0 + _DetailMask ("Detail Mask (R:Texture, G:Normal)", 2D) = "white" { } + [HideInInspector][Vector2]_DetailMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DetailMaskUV ("UV", Int) = 0 + _DetailTint ("Detail Texture Tint", Color) = (1, 1, 1) + _DetailTex ("Detail Texture", 2D) = "gray" { } + [HideInInspector][Vector2]_DetailTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DetailTexUV ("UV", Int) = 0 + _DetailTexIntensity ("Detail Tex Intensity", Range(0, 10)) = 1 + _DetailBrightness ("Detail Brightness:", Range(0, 2)) = 1 + [Normal]_DetailNormalMap ("Detail Normal", 2D) = "bump" { } + _DetailNormalMapScale ("Detail Normal Intensity", Range(0, 10)) = 1 + [HideInInspector][Vector2]_DetailNormalMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DetailNormalMapUV ("UV", Int) = 0 + [HideInInspector] m_end_DetailOptions ("Details", Float) = 0 + + // Vertex Colors + [HideInInspector] m_start_MainVertexColors ("Vertex Colors", Float) = 0 + _MainVertexColoring ("Use Vertex Color", Range(0, 1)) = 0 + _MainUseVertexColorAlpha ("Use Vertex Color Alpha", Range(0, 1)) = 0 + [HideInInspector] m_end_MainVertexColors ("Vertex Colors", Float) = 0 + + //Vertex Manipulations + [HideInInspector] m_start_vertexManipulation ("Vertex Offset--{reference_property:_VertexManipulationsEnabled, button_right:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=x728WN50JeA&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube},is_hideable:true}", Float) = 0 + [HideInInspector][ThryToggle(AUTO_EXPOSURE)]_VertexManipulationsEnabled ("Enabled", Float) = 0 + [Vector3]_VertexManipulationLocalTranslation ("Local Translation", Vector) = (0, 0, 0, 1) + [Vector3]_VertexManipulationLocalRotation ("Local Rotation", Vector) = (0, 0, 0, 1) + _VertexManipulationLocalScale ("Local Scale", Vector) = (1, 1, 1, 1) + [Vector3]_VertexManipulationWorldTranslation ("World Translation", Vector) = (0, 0, 0, 1) + _VertexManipulationHeight ("Vertex Height", Float) = 0 + _VertexManipulationHeightMask ("Height Map", 2D) = "white" { } + [HideInInspector][Vector2]_VertexManipulationHeightPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _VertexManipulationHeightUV ("UV", Int) = 0 + _VertexManipulationHeightBias ("Mask Bias", Range(0, 1)) = 0 + [ToggleUI]_VertexRoundingEnabled ("Rounding Enabled", Float) = 0 + _VertexRoundingDivision ("Division Amount", Float) = 500 + [HideInInspector] m_end_vertexManipulation ("Vertex Offset", Float) = 0 + + // Alpha Options + [HideInInspector] m_start_Alpha ("Alpha Options", Float) = 0 + _Cutoff ("Alpha Cuttoff", Range(0, 1.001)) = 0.5 + [ToggleUI]_DitheringEnabled ("Enable Dithering", Float) = 0 + _DitherGradient ("Dither Gradient", Range(0, 1)) = .1 + [ToggleUI]_ForceOpaque ("Force Opaque", Float) = 0 + _MainShadowClipMod ("Shadow Clip Mod", Range(-1, 1)) = 0 + [Enum(Off, 0, On, 1)] _AlphaToMask ("Alpha To Coverage", Float) = 0 + [ToggleUI]_MainAlphaToCoverage ("Sharpenned A2C--{condition_show:{type:PROPERTY_BOOL,data:_AlphaToMask==1}}", Float) = 0 + _MainMipScale ("Mip Level Alpha Scale--{condition_show:{type:PROPERTY_BOOL,data:_AlphaToMask==1}}", Range(0, 1)) = 0.25 + [ToggleUI]_AlphaPremultiply ("Alpha Premultiply", Float) = 0 + _AlphaMod ("Alpha Mod", Range(-1, 1)) = 0.0 + [HideInInspector] m_end_Alpha ("Alpha Options", Float) = 0 + + // Decal Texture + [HideInInspector] m_start_DecalSection ("Decals--{button_right:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=xHoQVN_F7JE&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw},hover:YouTube},reference_property:_DecalEnabled,is_hideable:true}", Float) = 0 + _DecalMask ("Decal RGBA Mask--{reference_properties:[_DecalMaskPan, _DecalMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DecalMaskUV ("UV", Int) = 0 + // Decal 0 + [HideInInspector] m_start_Decal0 ("Decal 0", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH)]_DecalEnabled ("Enable", Float) = 0 + _DecalColor ("Color", Color) = (1, 1, 1, 1) + _DecalEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture ("Decal--{reference_properties:[_DecalTexturePan, _DecalTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DecalTextureUV ("UV", Int) = 0 + [ToggleUI]_DecalTiled ("Tiled?", Float) = 0 + _Decal0Depth ("Depth", Float) = 0 + [Vector2]_DecalScale ("Scale", Vector) = (1, 1, 0, 0) + [Vector2]_DecalPosition ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalHueShiftEnabled ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed ("Shift Speed", Float) = 0 + _DecalHueShift ("Hue Shift", Range(0,1)) = 0 + // Decal 0 Audio Link + [HideInInspector] m_start_Decal0AudioLink ("Audio Link ♫--{is_hideable:true, condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal0Scale("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal0Alpha("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal0EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal0Emission("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal0AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal0 ("Decal 0", Float) = 0 + // Decal 1 + //"GEOM_TYPE_FROND" + //"DEPTH_OF_FIELD_COC_VIEW" + [HideInInspector] m_start_Decal1 ("Decal 1--{reference_property:_DecalEnabled1}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_BRANCH_DETAIL)]_DecalEnabled1 ("Enable", Float) = 0 + _DecalColor1 ("Color", Color) = (1, 1, 1, 1) + _DecalEmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture1 ("Decal--{reference_properties:[_DecalTexture1Pan, _DecalTexture1UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DecalTexture1UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled1 ("Tiled?", Float) = 0 + _Decal1Depth ("Depth", Float) = 0 + [Vector2]_DecalScale1 ("Scale", Vector) = (1, 1, 0, 0) + [Vector2]_DecalPosition1 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation1 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed1 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType1 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha1("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalHueShiftEnabled1 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed1 ("Shift Speed", Float) = 0 + _DecalHueShift1 ("Hue Shift", Range(0,1)) = 0 + // Decal 1 Audio Link + [HideInInspector] m_start_Decal1AudioLink ("Audio Link ♫--{is_hideable:true, condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal1Scale("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal1Alpha("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal1EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal1Emission("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal1AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal1 ("Decal 0", Float) = 0 + // Decal 2 + [HideInInspector] m_start_Decal2 ("Decal 2--{reference_property:_DecalEnabled2}", Float) = 0 + [HideInInspector][ThryToggle(GEOM_TYPE_FROND)]_DecalEnabled2 ("Enable", Float) = 0 + _DecalColor2 ("Color", Color) = (1, 1, 1, 1) + _DecalEmissionStrength2 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture2 ("Decal--{reference_properties:[_DecalTexture2Pan, _DecalTexture2UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture2Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DecalTexture2UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled2 ("Tiled?", Float) = 0 + _Decal2Depth ("Depth", Float) = 0 + [Vector2]_DecalScale2 ("Scale", Vector) = (1, 1, 0, 0) + [Vector2]_DecalPosition2 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation2 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed2 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType2 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha2("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalHueShiftEnabled2 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed2 ("Shift Speed", Float) = 0 + _DecalHueShift2 ("Hue Shift", Range(0,1)) = 0 + // Decal 2 Audio Link + [HideInInspector] m_start_Decal2AudioLink ("Audio Link ♫--{is_hideable:true, condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal2Scale("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal2Alpha("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal2EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal2Emission("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal2AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal2 ("Decal 0", Float) = 0 + // Decal 3 + [HideInInspector] m_start_Decal3 ("Decal 3--{reference_property:_DecalEnabled3}", Float) = 0 + [HideInInspector][ThryToggle(DEPTH_OF_FIELD_COC_VIEW)]_DecalEnabled3 ("Enable", Float) = 0 + _DecalColor3 ("Color", Color) = (1, 1, 1, 1) + _DecalEmissionStrength3 ("Emission Strength", Range(0, 20)) = 0 + _DecalTexture3 ("Decal--{reference_properties:[_DecalTexture3Pan, _DecalTexture3UV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DecalTexture3Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DecalTexture3UV ("UV", Int) = 0 + [ToggleUI]_DecalTiled3 ("Tiled?", Float) = 0 + _Decal3Depth ("Depth", Float) = 0 + [Vector2]_DecalScale3 ("Scale", Vector) = (1, 1, 0, 0) + [Vector2]_DecalPosition3 ("Position", Vector) = (.5, .5, 0, 0) + _DecalRotation3 ("Rotation", Range(0, 360)) = 0 + _DecalRotationSpeed3 ("Rotation Speed", Float) = 0 + [ThryWideEnum(Replace, 0, Darken, 1, Multiply, 2, Color Burn, 3, Linear Burn, 4, Lighten, 5, Screen, 6, Color Dodge, 7, Linear Dodge (Add), 8, Overlay, 9, Soft Lighten, 10, Hard Light, 11, Vivid Light, 12, Linear Light, 13, Pin Light, 14, Hard Mix, 15, Difference, 16, Exclusion, 17, Subtract, 18, Divide, 19)]_DecalBlendType3 ("Blending", Range(0, 1)) = 0 + _DecalBlendAlpha3("Alpha", Range(0,1)) = 1 + [ToggleUI]_DecalHueShiftEnabled3 ("Hue Shift Enabled", Float) = 0 + _DecalHueShiftSpeed3 ("Shift Speed", Float) = 0 + _DecalHueShift3 ("Hue Shift", Range(0,1)) = 0 + // Decal 3 Audio Link + [HideInInspector] m_start_Decal3AudioLink ("Audio Link ♫--{is_hideable:true, condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3ScaleBand ("Scale Band", Int) = 0 + _AudioLinkDecal3Scale("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3AlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkDecal3Alpha("Alpha Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDecal3EmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkDecal3Emission("Emission Mod", Vector) = (0,0,0,0) + [HideInInspector] m_end_Decal3AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_Decal3 ("Decal 0", Float) = 0 + [HideInInspector] m_end_DecalSection ("Decal", Float) = 0 + + // Back Face Textures and Emission + [HideInInspector] m_start_backFace ("Back Face", Float) = 0 + [ToggleUI]_BackFaceEnabled ("Enable Back Face Options", Float) = 0 + _BackFaceColor ("Color", Color) = (1, 1, 1, 1) + _BackFaceTexture ("Texture", 2D) = "white" { } + [HideInInspector][Vector2]_BackFacePanning ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)]_BackFaceTextureUV ("UV#", Int) = 0 + _BackFaceDetailIntensity ("Detail Intensity", Range(0, 5)) = 1 + _BackFaceHueShift ("Hue Shift", Range(0, 1)) = 0 + _BackFaceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [HideInInspector] m_end_backFace ("Back Face", Float) = 0 + + // Lighting + [HideInInspector] m_lightingOptions ("Lighting", Float) = 0 + [HideInInspector] m_start_Lighting ("Light and Shadow", Float) = 0 + [Toggle(VIGNETTE_MASKED)]_EnableLighting ("Enable Lighting", Float) = 1 + [Enum(Toon, 0, Realistic, 1, Wrapped (Beta), 2, Skin (Beta), 3, Flat, 4)] _LightingMode ("Lighting Type", Int) = 4 + _LightingStandardSmoothness ("Smoothness--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==1}}", Range(0, 1)) = 0 + _LightingWrappedWrap ("Wrap--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==2}}", Range(0, 2)) = 0 + _LightingWrappedNormalization ("Normalization--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==2}}", Range(0, 1)) = 0 + [Enum(Ramp Texture, 0, Math Gradient, 1, Shade Mapping, 2)] _LightingRampType ("Ramp Type--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingMode==2}}}}", Int) = 0 + + // Shade Maps + _1st_ShadeColor ("1st ShadeColor--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}", Color) = (1,1,1,1) + _1st_ShadeMap ("1st ShadeMap--{reference_properties:[_1st_ShadeMapPan, _1st_ShadeMapUV, _Use_1stShadeMapAlpha_As_ShadowMask, _1stShadeMapMask_Inverse],condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}", 2D) = "white" {} + [HideInInspector][Vector2]_1st_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _1st_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_1stShadeMapAlpha_As_ShadowMask("1st ShadeMap.a As ShadowMask", Float ) = 0 + [HideInInspector][ToggleUI]_1stShadeMapMask_Inverse("1st ShadeMapMask Inverse", Float ) = 0 + [ToggleUI] _Use_BaseAs1st ("Use BaseMap as 1st ShadeMap--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}}", Float ) = 0 + _2nd_ShadeColor ("2nd ShadeColor--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}", Color) = (1,1,1,1) + _2nd_ShadeMap ("2nd ShadeMap--{reference_properties:[_2nd_ShadeMapPan, _2nd_ShadeMapUV, _Use_2ndShadeMapAlpha_As_ShadowMask, _2ndShadeMapMask_Inverse],condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}", 2D) = "white" {} + [HideInInspector][Vector2]_2nd_ShadeMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _2nd_ShadeMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Use_2ndShadeMapAlpha_As_ShadowMask("2nd ShadeMap.a As ShadowMask", Float ) = 0 + [HideInInspector][ToggleUI]_2ndShadeMapMask_Inverse("2nd ShadeMapMask Inverse", Float ) = 0 + [ToggleUI] _Use_1stAs2nd ("Use 1st ShadeMap as 2nd_ShadeMap--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}", Float ) = 0 + _BaseColor_Step ("BaseColor_Step--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}", Range(0.01, 1)) = 0.5 + _BaseShade_Feather ("Base/Shade_Feather--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}", Range(0.0001, 1)) = 0.0001 + _ShadeColor_Step ("ShadeColor_Step--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}", Range(0.01, 1)) = 0 + _1st2nd_Shades_Feather ("1st/2nd_Shades_Feather--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==2}}}", Range(0.0001, 1)) = 0.0001 + + // Ramp + [Gradient]_ToonRamp ("Lighting Ramp--{texture:{width:512,height:4,filterMode:Bilinear,wrapMode:Clamp},force_texture_options:true,condition_show:{type:AND,condition1:{type:OR,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingMode==2}},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==0}}}", 2D) = "white" { } + _LightingShadowMask ("Ramp Mask--{reference_properties:[_LightingShadowMaskPan, _LightingShadowMaskUV],condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingMode==2}}}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingShadowMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _LightingShadowMaskUV ("UV", Int) = 0 + _ShadowOffset ("Ramp Offset--{condition_show:{type:AND,condition1:{type:OR,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingMode==2}},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==0}}}}", Range(-1, 1)) = 0 + //Math + _LightingGradientStart ("Gradient Start--{condition_show:{type:AND,condition1:{type:OR,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingMode==2}},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==1}}}", Range(0, 1)) = 0 + _LightingGradientEnd ("Gradient End--{condition_show:{type:AND,condition1:{type:OR,condition1:{type:PROPERTY_BOOL,data:_LightingMode==0},condition2:{type:PROPERTY_BOOL,data:_LightingMode==2}},condition2:{type:PROPERTY_BOOL,data:_LightingRampType==1}}}", Range(0, 1)) = .5 + // Skin + _SkinLUT ("LUT--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==3}}", 2D) = "white" {} + //_SssMaskCutoff ("Mask Cutoff--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==3}}", Range(0.01,1)) = 0.1 + //_SssBias ("Bias--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==3}}", Range(0,1)) = 0 + _SssScale ("Scale--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==3}}", Range(0,1)) = 1 + [HideInInspector]_SssBumpBlur ("Bump Blur--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==3}}", Range(0,1)) = 0.7 + [HideInInspector][Vector3]_SssTransmissionAbsorption ("Absorption--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==3}}", Vector) = (-8,-40,-64,0) + [HideInInspector][Vector3]_SssColorBleedAoWeights ("AO Color Bleed--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode==3}}", Vector) = (0.4,0.15,0.13,0) + _LightingShadowColor ("Shadow Tint--{reference_property:_LightingDetailShadowsEnabled, condition_showS:(_LightingMode==0&&_LightingRampType!=2)||_LightingMode==2||_LightingMode==3}", Color) = (1, 1, 1, 1) + _ShadowStrength ("Shadow Strength--{condition_showS:(_LightingMode==0&&_LightingRampType!=2)||_LightingMode==2}", Range(0, 1)) = 1 + _AttenuationMultiplier ("Unity Shadows--{condition_show:{type:PROPERTY_BOOL,data:_LightingMode!=4}}", Range(0, 1)) = 0 + [ToggleUI]_LightingIgnoreAmbientColor ("Ignore Ambient Color--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_LightingMode!=4},condition2:{type:PROPERTY_BOOL,data:_LightingMode!=1}}}", Float) = 0 + + //_LightingShadowMap ("Shadow Color(RGB) and wrap(A)--{reference_properties:[_LightingShadowMapPan, _LightingShadowMapUV],condition_show:{type:PROPERTY_BOOL,data:_LightingMode==2}}}", 2D) = "white" { } + //[HideInInspector][Vector2]_LightingShadowMapPan ("Panning", Vector) = (0, 0, 0, 0) + //[HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _LightingShadowMapUV ("UV", Int) = 0 + + [HideInInspector] m_start_lightingModifiers ("Lighting Modifiers", Float) = 0 + [Enum(Poi Custom, 0, Correct, 1)] _LightingDirectColorMode ("Direct Light Color", Int) = 0 + [ToggleUI]_LightingIndirectColorMode ("Indirect Uses Normals", Float) = 0 + [ToggleUI]_LightingUncapped ("Uncapped Lighting", Float) = 0 + [ToggleUI]_LightingOnlyUnityShadows ("Only Unity Shadows", Float) = 0 + _LightingMonochromatic ("Monochromatic Lighting?", Range(0,1)) = 0 + _LightingMinLightBrightness ("Min Brightness", Range(0, 1)) = 0 + _LightingMinShadowBrightnessRatio ("Shadow:Light min Ratio", Range(0, 1)) = 0 + [HideInInspector] m_end_lightingModifiers ("Lighting Modifiers", Float) = 0 + + [HideInInspector] m_start_detailShadows ("Detail Shadows--{reference_property:_LightingDetailShadowsEnabled, condition_show:{type:PROPERTY_BOOL,data:_LightingMode!=4}}", Float) = 0 + [HideInInspector][ToggleUI]_LightingDetailShadowsEnabled ("Enabled Detail Shadows?", Float) = 0 + _LightingDetailShadows ("Detail Shadows--{reference_properties:[_LightingDetailShadowsPan, _LightingDetailShadowsUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_LightingDetailShadowsPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _LightingDetailShadowsUV ("UV", Int) = 0 + _LightingDetailStrength ("Detail Strength", Range(0, 1)) = 1 + [HideInInspector] m_end_detailShadows ("Detail Shadows", Float) = 0 + + [HideInInspector] m_start_ambientOcclusion ("Ambient Occlusion--{reference_property:_LightingEnableAO}", Float) = 0 + [HideInInspector][ToggleUI]_LightingEnableAO ("Enable AO", Float) = 0 + _LightingAOTex ("AO Map", 2D) = "white" { } + [HideInInspector][Vector2]_LightingAOTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _LightingAOTexUV ("UV", Int) = 0 + _AOStrength ("AO Strength", Range(0, 1)) = 1 + [HideInInspector] m_end_ambientOcclusion ("Ambient Occlusion", Float) = 0 + + // HSL Lighting + [HideInInspector] m_start_lightingHSL ("HSL Lighting--{reference_property:_LightingEnableHSL, condition_show:{type:PROPERTY_BOOL,data:_LightingMode==0}}", Float) = 0 + [HideInInspector][ToggleUI]_LightingEnableHSL ("Enabled HSL Lighting", Float) = 0 + _LightingHSLIntensity ("Shadow HSL Intensity", Range(0, 1)) = 1 + _LightingShadowHue ("Shadow Hue Change", Range(0, 1)) = 0.5 + _LightingShadowSaturation ("Shadow Saturation Change", Range(0, 1)) = 0.5 + _LightingShadowLightness ("Shadow Lightness Change", Range(0, 1)) = 0.5 + [HideInInspector] m_end_lightingHSL ("HSL Lighting", Float) = 0 + + // point/spot Light Settings + [HideInInspector] m_start_lightingAdvanced ("Additive Lighting (Point/Spot)--{reference_property:_commentIfZero_LightingAdditiveEnable,button_right:{text:Tutorial,action:{type:URL,data:https://www.youtube.com/watch?v=at3p5yRRVU0&list=PL4_Gy3VRJSmbXfQSldzUiChgABQsoBlLw&index=12},hover:YouTube}}", Float) = 0 + [HideInInspector][ToggleUI]_commentIfZero_LightingAdditiveEnable ("Enable Additive", Float) = 1 + [Enum(Realistic, 0, Toon, 1, Wrapped, 2)] _LightingAdditiveType ("Lighting Type", Int) = 1 + _LightingAdditiveGradientStart ("Gradient Start", Range(0, 1)) = 0 + _LightingAdditiveGradientEnd ("Gradient End", Range(0, 1)) = .5 + _LightingAdditivePassthrough ("Point Light Passthrough", Range(0, 1)) = .5 + _LightingAdditiveDetailStrength ("Detail Shadow Strength", Range(0, 1)) = 1 + [ToggleUI]_LightingAdditiveLimitIntensity ("Limit Intensity", Float) = 0 + _LightingAdditiveMaxIntensity ("Max Intensity--{condition_show:{type:PROPERTY_BOOL,data:_LightingAdditiveLimitIntensity==1}}", Range(0, 3)) = 1 + [Toggle(_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A)]_DisableDirectionalInAdd ("No Directional", Float) = 1 + [ThryToggle(_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A)]_DisableDirectionalInAdd ("No Directional", Float) = 1 + [HideInInspector] m_end_lightingAdvanced ("Additive Lighting", Float) = 0 + [HideInInspector] m_end_Lighting ("Light and Shadow", Float) = 0 + + // Subsurface Scattering + [HideInInspector] m_start_subsurface ("Subsurface Scattering", Float) = 0 + [ThryToggle(_TERRAIN_NORMAL_MAP)]_EnableSSS ("Enable Subsurface Scattering", Float) = 0 + _SSSColor ("Subsurface Color", Color) = (1, 0, 0, 1) + _SSSThicknessMap ("Thickness Map", 2D) = "black" { } + [HideInInspector][Vector2]_SSSThicknessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SSSThicknessMapUV ("UV", Int) = 0 + _SSSThicknessMod ("Thickness mod", Range(-1, 1)) = 0 + _SSSSCale ("Light Strength", Range(0, 1)) = 0.25 + _SSSPower ("Light Spread", Range(1, 100)) = 5 + _SSSDistortion ("Light Distortion", Range(0, 1)) = 1 + [HideInInspector] m_end_subsurface ("Subsurface Scattering", Float) = 0 + /* + // Subsurface Scattering + [HideInInspector] m_start_subsurface ("Subsurface Scattering", Float) = 0 + [ThryToggle(_TERRAIN_NORMAL_MAP)]_EnableSSS ("Enable Subsurface Scattering", Float) = 0 + _SSSColor ("Subsurface Color", Color) = (1, 0, 0, 1) + _SSSStrength ("Strength", Float) = 4 + _SSSConstant ("Constant", Range(0, .5)) = 0.1 + _SSSNDotL ("NDotL Reduction", Range(0, 1)) = 0 + _SSSExponent ("Spot Exponent", Range(2, 100)) = 30 + _SSSNormalOffset ("Scattering", Range(0, .3)) = 0.05 + _SSSPointLightDirectionality ("Point Light Directionality", Range(0, 1)) = .7 + _SSSThicknessMap ("Thickness Map--{reference_properties:[_SSSThicknessMapPan, _SSSThicknessMapUV, _SSSThickness]}", 2D) = "black" { } + [HideInInspector][Vector2]_SSSThicknessMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SSSThicknessMapUV ("UV", Int) = 0 + [HideInInspector]_SSSThickness ("Strength", Range(0, 1)) = 1 + [HideInInspector] m_end_subsurface ("Subsurface Scattering", Float) = 0 + */ + + + // Rim Lighting + [HideInInspector] m_start_rimLightOptions ("Rim Lighting", Float) = 0 + [ThryToggle(_GLOSSYREFLECTIONS_OFF)]_EnableRimLighting ("Enable Rim Lighting", Float) = 0 + [Enum(vertex, 0, pixel, 1)] _RimLightNormal ("Normal Select", Int) = 1 + [ToggleUI]_RimLightingInvert ("Invert Rim Lighting", Float) = 0 + _RimLightColor ("Rim Color", Color) = (1, 1, 1, 1) + _RimWidth ("Rim Width", Range(0, 1)) = 0.8 + _RimSharpness ("Rim Sharpness", Range(0, 1)) = .25 + _RimStrength ("Rim Emission", Range(0, 20)) = 0 + _RimBrighten ("Rim Color Brighten", Range(0, 3)) = 0 + _RimLightColorBias ("Rim Color Bias", Range(0, 1)) = 1 + _RimTex ("Rim Texture", 2D) = "white" { } + [HideInInspector][Vector2]_RimTexPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _RimTexUV ("UV", Int) = 0 + _RimMask ("Rim Mask", 2D) = "white" { } + [HideInInspector][Vector2]_RimMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _RimMaskUV ("UV", Int) = 0 + + [HideInInspector] m_start_rimHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_RimHueShiftEnabled ("Enabled", Float) = 0 + _RimHueShiftSpeed ("Shift Speed", Float) = 0 + _RimHueShift ("Hue Shift", Range(0,1)) = 0 + [HideInInspector] m_end_rimHueShift ("Hue Shift", Float) = 0 + + // Rim Noise + [HideInInspector] m_start_rimWidthNoise ("Width Noise", Float) = 0 + _RimWidthNoiseTexture ("Rim Width Noise", 2D) = "black" { } + [HideInInspector][Vector2]_RimWidthNoiseTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _RimWidthNoiseTextureUV ("UV", Int) = 0 + _RimWidthNoiseStrength ("Intensity", Range(0, 1)) = 0.1 + [HideInInspector] m_end_rimWidthNoise ("Width Noise", Float) = 0 + + // Rim Shadow Mix + [HideInInspector] m_start_ShadowMix ("Shadow Mix", Float) = 0 + _ShadowMix ("Shadow Mix In", Range(0, 1)) = 0 + _ShadowMixThreshold ("Shadow Mix Threshold", Range(0, 1)) = .5 + _ShadowMixWidthMod ("Shadow Mix Width Mod", Range(0, 10)) = .5 + [HideInInspector] m_end_ShadowMix ("Shadow Mix", Float) = 0 + [HideInInspector] m_end_rimLightOptions ("Rim Lighting", Float) = 0 + + // Environmental Rim Lighting + [HideInInspector] m_start_reflectionRim ("Environmental Rim", Float) = 0 + [ThryToggle(_MAPPING_6_FRAMES_LAYOUT)]_EnableEnvironmentalRim ("Enable Environmental Rim", Float) = 0 + _RimEnviroMask ("Mask", 2D) = "white" { } + [HideInInspector][Vector2]_RimEnviroMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _RimEnviroMaskUV ("UV", Int) = 0 + _RimEnviroBlur ("Blur", Range(0, 1)) = 0.7 + _RimEnviroWidth ("Rim Width", Range(0, 1)) = 0.45 + _RimEnviroSharpness ("Rim Sharpness", Range(0, 1)) = 0 + _RimEnviroMinBrightness ("Min Brightness Threshold", Range(0, 2)) = 0 + _RimEnviroIntensity ("Intensity", Range(0, 1)) = 1 + [HideInInspector] m_end_reflectionRim ("Environmental Rim", Float) = 0 + + // Baked Lighting + [HideInInspector] m_start_bakedLighting ("Baked Lighting", Float) = 0 + _SpecularLMOcclusion("Specular Occlusion", Range(0,1)) = 0 + _SpecLMOcclusionAdjust("Spec Occlusion Sensitiviy", Range(0,1)) = 0.2 + _GIEmissionMultiplier ("GI Emission Multiplier", Float) = 1 + [HideInInspector] DSGI ("DSGI", Float) = 0 //add this property for double sided illumination settings to be shown + [HideInInspector] LightmapFlags ("Lightmap Flags", Float) = 0 //add this property for lightmap flags settings to be shown + [HideInInspector] m_end_bakedLighting ("Baked Lighting", Float) = 0 + + [Helpbox(3)] _LockTooltip ("ALWAYS LOCK IN BEFORE UPLOADING. || RIGHT CLICK A PROPERTY IF YOU WANT TO ANIMATE IT.", Int) = 0 + + // BRDF + [HideInInspector] m_start_brdf ("Metallics & Specular--{reference_property:_EnableBRDF}", Float) = 0 + [HideInInspector][ThryToggle(VIGNETTE_CLASSIC)]_EnableBRDF ("Enable", Float) = 0 + _BRDFMetallicGlossMap ("Metallic Gloss Map--{reference_properties:[_BRDFMetallicGlossMapPan, _BRDFMetallicGlossMapUV, _BRDFInvertGlossiness, _BRDFMetallicGlossMapToolTip]}", 2D) = "white" { } + [HideInInspector][Helpbox(1)] _BRDFMetallicGlossMapToolTip ("R = Metallic, G = Reflectance, A = Glossiness/Smoothness/Inverse Roughness", Int) = 0 + [HideInInspector][ToggleUI]_BRDFInvertGlossiness ("Invert Glossiness", Float) = 0 + [HideInInspector][Vector2]_BRDFMetallicGlossMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _BRDFMetallicGlossMapUV ("UV", Int) = 0 + _BRDFSpecularMap ("Specular Tint/Mask--{reference_properties:[_BRDFSpecularMapPan, _BRDFSpecularMapUV, _BRDFSpecularMapToolTip]}", 2D) = "white" { } + [HideInInspector][Helpbox(1)] _BRDFSpecularMapToolTip ("RGB = Color, A = Mask", Int) = 0 + [HideInInspector][Vector2]_BRDFSpecularMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _BRDFSpecularMapUV ("UV", Int) = 0 + _BRDFMetallicMap ("Metallic Tint/Mask--{reference_properties:[_BRDFMetallicMapPan, _BRDFMetallicMapUV, _BRDFMetallicMapToolTip]}", 2D) = "white" { } + [HideInInspector][Helpbox(1)] _BRDFMetallicMapToolTip ("RGB = Color, A = Mask", Int) = 0 + [HideInInspector][Vector2]_BRDFMetallicMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _BRDFMetallicMapUV ("UV", Int) = 0 + _BRDFMetallic ("Metallic", Range(0,1)) = 0 + _BRDFGlossiness ("Glossiness", Range(0,1)) = 0 + _BRDFReflectance ("Reflectance", Range(0,1)) = .5 + _BRDFAnisotropy ("Anisotropy", Range(-1,1)) = 0 + [ToggleUI]_BRDFReflectionsEnabled ("Enable Reflections", Float) = 1 + [ToggleUI]_BRDFSpecularEnabled ("Enable Specular", Float) = 1 + _BRDFFallback ("Fallback Reflection", Cube) = "" { } + [ToggleUI]_BRDFForceFallback ("Force Fallback Reflection", Range(0, 1)) = 0 + [HideInInspector] m_end_brdf ("Baked Lighting", Float) = 0 + + // Metallics + [HideInInspector] m_start_Metallic ("Metallicsa", Float) = 0 + [ThryToggle(_METALLICGLOSSMAP)]_EnableMetallic ("Enable Metallics", Float) = 0 + _CubeMap ("Baked CubeMap", Cube) = "" { } + [ToggleUI]_SampleWorld ("Force Baked Cubemap", Range(0, 1)) = 0 + _MetalReflectionTint ("Reflection Tint", Color) = (1, 1, 1) + _MetallicTintMap ("Tint Map", 2D) = "white" { } + [HideInInspector][Vector2]_MetallicTintMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _MetallicTintMapUV ("UV", Int) = 0 + _MetallicMask ("Metallic Mask", 2D) = "white" { } + [HideInInspector][Vector2]_MetallicMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _MetallicMaskUV ("UV", Int) = 0 + _Metallic ("Metallic", Range(0, 1)) = 0 + _SmoothnessMask ("Smoothness Map", 2D) = "white" { } + [HideInInspector][Vector2]_SmoothnessMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SmoothnessMaskUV ("UV", Int) = 0 + [ToggleUI]_InvertSmoothness ("Invert Smoothness Map", Range(0, 1)) = 0 + _Smoothness ("Smoothness", Range(0, 1)) = 0 + [HideInInspector] m_end_Metallic ("Metallics", Float) = 0 + + // Clearcoat + [HideInInspector] m_start_clearCoat ("Clear Coat", Float) = 0 + [ThryToggle(_COLORCOLOR_ON)]_EnableClearCoat ("Enable Clear Coat", Float) = 0 + //[Enum(Vertex, 0, Pixel, 1)] _ClearCoatNormalToUse ("What Normal?", Int) = 0 + //_ClearCoatTint ("Reflection Tint", Color) = (1, 1, 1) + _ClearcoatMap ("Clear Coat Map--{reference_properties:[_ClearcoatMapPan, _ClearcoatMapUV, _ClearcoatInvertSmoothness, _ClearcoatHelpBox]}", 2D) = "white" { } + [HideInInspector][Helpbox(1)] _ClearcoatHelpBox ("R = Clear Coat Map, G = Specular Mask, B = Reflection Mask, A = Glossiness/Smoothness/Inverse Roughness", Int) = 0 + [HideInInspector][Vector2]_ClearcoatMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _ClearcoatMapUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_ClearcoatInvertSmoothness ("Invert Smoothness", Range(0, 1)) = 0 + _Clearcoat ("Clear Coat", Range(0, 1)) = 1 + _ClearcoatGlossiness ("Smoothness", Range(0, 1)) = 0 + _ClearcoatAnisotropy ("Anisotropy", Range(-1, 1)) = 0 + [ToggleUI]_ClearcoatEnableReflections ("Enable Reflections", Range(0, 1)) = 1 + [ToggleUI]_ClearcoatEnableSpecular ("Enable Specular", Range(0, 1)) = 1 + _ClearcoatFallback ("Fallback CubeMap", Cube) = "" { } + [ToggleUI]_ClearcoatForceFallback ("Force Fallback Cubemap", Range(0, 1)) = 0 + [HideInInspector] m_end_clearCoat ("Clear Coat", Float) = 0 + + // First Matcap + [HideInInspector] m_start_matcap ("Matcap / Sphere Textures", Float) = 0 + [ThryToggle(_COLORADDSUBDIFF_ON)]_MatcapEnable ("Enable Matcap", Float) = 0 + _MatcapColor ("Color", Color) = (1, 1, 1, 1) + [TextureNoSO]_Matcap ("Matcap", 2D) = "white" { } + _MatcapBorder ("Border", Range(0, .5)) = 0.43 + _MatcapMask ("Mask--{reference_properties:[_MatcapMaskPan, _MatcapMaskUV, _MatcapMaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_MatcapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _MatcapMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_MatcapMaskInvert("Invert", Float) = 0 + _MatcapEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _MatcapIntensity ("Intensity", Range(0, 5)) = 1 + _MatcapLightMask ("Hide in Shadow", Range(0, 1)) = 0 + _MatcapReplace ("Replace With Matcap", Range(0, 1)) = 1 + _MatcapMultiply ("Multiply Matcap", Range(0, 1)) = 0 + _MatcapAdd ("Add Matcap", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _MatcapNormal ("Normal to use", Int) = 1 + [HideInInspector] m_start_matcapHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_MatcapHueShiftEnabled ("Enabled", Float) = 0 + _MatcapHueShiftSpeed ("Shift Speed", Float) = 0 + _MatcapHueShift ("Hue Shift", Range(0,1)) = 0 + [HideInInspector] m_end_matcapHueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_end_matcap ("Matcap", Float) = 0 + + // Second Matcap + [HideInInspector] m_start_Matcap2 ("Matcap 2", Float) = 0 + [ThryToggle(COLOR_GRADING_HDR_3D)]_Matcap2Enable ("Enable Matcap 2", Float) = 0 + _Matcap2Color ("Color", Color) = (1, 1, 1, 1) + [TextureNoSO]_Matcap2 ("Matcap", 2D) = "white" { } + _Matcap2Border ("Border", Range(0, .5)) = 0.43 + _Matcap2Mask ("Mask--{reference_properties:[_Matcap2MaskPan, _Matcap2MaskUV, _Matcap2MaskInvert]}", 2D) = "white" { } + [HideInInspector][Vector2]_Matcap2MaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _Matcap2MaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_Matcap2MaskInvert("Invert", Float) = 0 + _Matcap2EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _Matcap2Intensity ("Intensity", Range(0, 5)) = 1 + _Matcap2LightMask ("Hide in Shadow", Range(0, 1)) = 0 + _Matcap2Replace ("Replace With Matcap", Range(0, 1)) = 0 + _Matcap2Multiply ("Multiply Matcap", Range(0, 1)) = 0 + _Matcap2Add ("Add Matcap", Range(0, 1)) = 0 + [Enum(Vertex, 0, Pixel, 1)] _Matcap2Normal ("Normal to use", Int) = 1 + [HideInInspector] m_start_matcap2HueShift ("Hue Shift", Float) = 0 + [ToggleUI]_Matcap2HueShiftEnabled ("Enabled", Float) = 0 + _Matcap2HueShiftSpeed ("Shift Speed", Float) = 0 + _Matcap2HueShift ("Hue Shift", Range(0,1)) = 0 + [HideInInspector] m_end_matcap2HueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_end_Matcap2 ("Matcap 2", Float) = 0 + + // Specular + [HideInInspector] m_start_specular ("Specular Reflections", Float) = 0 + [ThryToggle(_SPECGLOSSMAP)]_EnableSpecular ("Enable Specular", Float) = 0 + [Enum(Realistic, 1, Toon, 2, Anisotropic, 3, Toon Aniso, 4)] _SpecularType ("Specular Type", Int) = 1 + [Enum(vertex, 0, pixel, 1)] _SpecularNormal ("Normal Select", Int) = 1 + _SpecularTint ("Specular Tint", Color) = (1, 1, 1, 1) + _SpecularMetallic ("Metallic", Range(0, 1)) = 0 + [Gradient]_SpecularMetallicMap ("Metallic Map--{reference_properties:[_SpecularMetallicMapPan, _SpecularMetallicMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_SpecularMetallicMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularMetallicMapUV ("UV", Int) = 0 + _SpecularSmoothness ("Smoothness--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType==1},condition2:{type:PROPERTY_BOOL,data:_SpecularType==3}}}", Range(0, 1)) = 1 + [Gradient]_SpecularMap ("Specular Map", 2D) = "white" { } + [HideInInspector][Vector2]_SpecularMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularMapUV ("UV", Int) = 0 + [ToggleUI]_SpecularInvertSmoothness ("Invert Smoothness", Float) = 0 + _SpecularMask ("Specular Mask", 2D) = "white" { } + [HideInInspector][Vector2]_SpecularMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularMaskUV ("UV", Int) = 0 + [Enum(Alpha, 0, Grayscale, 1)] _SmoothnessFrom ("Smoothness From", Int) = 1 + // Anisotropic Specular + [Enum(Tangent, 0, binormal, 1)] _SpecWhatTangent ("(Bi)Tangent?--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType==4}}}", Int) = 0 + _AnisoSpec1Alpha ("Spec1 Alpha--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType==3}}", Range(0, 1)) = 1 + _AnisoSpec2Alpha ("Spec2 Alpha--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType==3}}", Range(0, 1)) = 1 + _Spec1Offset ("Spec1 Offset--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType==3}}", Range(-1, 1)) = 0 + _Spec2Smoothness ("Spec2 Smoothness--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType==3}}", Range(0, 1)) = 0 + [ToggleUI]_AnisoUseTangentMap ("Use Directional Map?--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType==4}}}", Float) = 0 + _AnisoTangentMap ("Anisotropic Directional Map--{reference_properties:[_AnisoTangentMapPan, _AnisoTangentMapUV], condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType==4}}}", 2D) = "bump" { } + [HideInInspector][Vector2]_AnisoTangentMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _AnisoTangentMapUV ("UV", Int) = 0 + //toon aniso + _SpecularToonStart ("Spec Toon Start--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType==4}}", Range(0, 1)) = .95 + _SpecularToonEnd ("Spec Toon End--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType==4}}", Range(0, 2)) = 1 + //[ToggleUI]_CenterOutSpecColor ("Center Out SpecMap--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType==4}}", Float) = 0 + [ToggleUI]_SpecularAnisoJitterMirrored ("Mirrored?--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType==4}}", Float) = 0 + [Curve]_SpecularAnisoJitterMicro ("Micro Shift--{reference_properties:[_SpecularAnisoJitterMicroPan, _SpecularAnisoJitterMicroUV], condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType==4}}}", 2D) = "black" { } + _SpecularAnisoJitterMicroMultiplier ("Micro Multiplier--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType==4}}}", Range(0, 10)) = 0 + [HideInInspector][Vector2]_SpecularAnisoJitterMicroPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularAnisoJitterMicroUV ("UV", Int) = 0 + [Curve]_SpecularAnisoJitterMacro ("Macro Shift--{reference_properties:[_SpecularAnisoJitterMacroPan, _SpecularAnisoJitterMacroUV], condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType==4}}}", 2D) = "black" { } + _SpecularAnisoJitterMacroMultiplier ("Macro Multiplier--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType==4}}}", Range(0, 10)) = 0 + [HideInInspector][Vector2]_SpecularAnisoJitterMacroPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularAnisoJitterMacroUV ("UV", Int) = 0 + // Toon Specular + [MultiSlider]_SpecularToonInnerOuter ("Inner/Outer Edge--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType==2}}", Vector) = (0.25, 0.3, 0, 1) + [HideInInspector] m_end_specular ("Specular Reflections", Float) = 0 + + // Second Specular + [HideInInspector] m_start_specular1 ("Specular Reflections 2", Float) = 0 + [ThryToggle(DITHERING)]_EnableSpecular1 ("Enable Specular", Float) = 0 + [Enum(Realistic, 1, Toon, 2, Anisotropic, 3, Toon Aniso, 4)] _SpecularType1 ("Specular Type", Int) = 1 + [Enum(vertex, 0, pixel, 1)] _SpecularNormal1 ("Normal Select", Int) = 1 + _SpecularTint1 ("Specular Tint", Color) = (1, 1, 1, 1) + _SpecularMetallic1 ("Metallic", Range(0, 1)) = 0 + [Gradient]_SpecularMetallicMap1 ("Metallic Map--{reference_properties:[_SpecularMetallicMapPan, _SpecularMetallicMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_SpecularMetallicMap1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularMetallicMap1UV ("UV", Int) = 0 + _SpecularSmoothness1 ("Smoothness--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType1==1},condition2:{type:PROPERTY_BOOL,data:_SpecularType1==3}}}", Range(-2, 1)) = .75 + _SpecularMap1 ("Specular Map", 2D) = "white" { } + [HideInInspector][Vector2]_SpecularMap1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularMap1UV ("UV", Int) = 0 + [ToggleUI]_SpecularInvertSmoothness1 ("Invert Smoothness", Float) = 0 + _SpecularMask1 ("Specular Mask", 2D) = "white" { } + [HideInInspector][Vector2]_SpecularMask1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularMask1UV ("UV", Int) = 0 + [Enum(Alpha, 0, Grayscale, 1)] _SmoothnessFrom1 ("Smoothness From", Int) = 1 + // Second Anisotropic Specular + [Enum(Tangent, 0, binormal, 1)] _SpecWhatTangent1 ("(Bi)Tangent?--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType1==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType1==4}}}", Int) = 0 + _AnisoSpec1Alpha1 ("Spec1 Alpha--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType1==3}}", Range(0, 1)) = 1 + _AnisoSpec2Alpha1 ("Spec2 Alpha--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType1==3}}", Range(0, 1)) = 1 + _Spec1Offset1 ("Spec1 Offset--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType1==3}}", Range(-1, 1)) = 0 + _Spec2Smoothness1 ("Spec2 Smoothness--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType1==3}}", Range(0, 1)) = 0 + [ToggleUI]_AnisoUseTangentMap1 ("Use Directional Map?--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType1==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType1==4}}}", Float) = 0 + _AnisoTangentMap1 ("Anisotropic Directional Map--{reference_properties:[_AnisoTangentMap1Pan, _AnisoTangentMap1UV], condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType1==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType1==4}}}", 2D) = "bump" { } + [HideInInspector][Vector2]_AnisoTangentMap1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _AnisoTangentMap1UV ("UV", Int) = 0 + // Second toon aniso + _SpecularToonStart1 ("Spec Toon Start--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType1==4}}", Range(0, 1)) = .95 + _SpecularToonEnd1 ("Spec Toon End--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType1==4}}", Range(0, 2)) = 1 + //[ToggleUI]_CenterOutSpecColor1 ("Center Out SpecMap--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType1==4}}", Float) = 0 + [ToggleUI]_SpecularAnisoJitterMirrored1 ("Mirrored?--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType1==4}}", Float) = 0 + [Curve]_SpecularAnisoJitterMicro1 ("Micro Shift--{reference_properties:[_SpecularAnisoJitterMicro1Pan, _SpecularAnisoJitterMicro1UV], condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType1==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType1==4}}}", 2D) = "black" { } + _SpecularAnisoJitterMicroMultiplier1 ("Micro Multiplier--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType1==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType1==4}}}", Range(0, 10)) = 0 + [HideInInspector][Vector2]_SpecularAnisoJitterMicro1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularAnisoJitterMicro1UV ("UV", Int) = 0 + [Curve]_SpecularAnisoJitterMacro1 ("Macro Shift--{reference_properties:[_SpecularAnisoJitterMacro1Pan, _SpecularAnisoJitterMacro1UV], condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType1==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType1==4}}}", 2D) = "black" { } + _SpecularAnisoJitterMacroMultiplier1 ("Macro Multiplier--{condition_show:{type:OR,condition1:{type:PROPERTY_BOOL,data:_SpecularType1==3},condition2:{type:PROPERTY_BOOL,data:_SpecularType1==4}}}", Range(0, 10)) = 0 + [HideInInspector][Vector2]_SpecularAnisoJitterMacro1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _SpecularAnisoJitterMacro1UV ("UV", Int) = 0 + // Second Toon Specular + [MultiSlider]_SpecularToonInnerOuter1 ("Inner/Outer Edge--{condition_show:{type:PROPERTY_BOOL,data:_SpecularType1==2}}", Vector) = (0.25, 0.3, 0, 1) + [HideInInspector] m_end_specular1 ("Specular Reflections", Float) = 0 + + // First Emission + [HideInInspector] m_Special_Effects ("Special Effects", Float) = 0 + [HideInInspector] m_start_emissionOptions ("Emission / Glow", Float) = 0 + [ThryToggle(_EMISSION)]_EnableEmission ("Enable Emission", Float) = 0 + [ToggleUI]_EmissionReplace ("Replace Base Color", Float) = 0 + [HDR]_EmissionColor ("Emission Color", Color) = (1, 1, 1, 1) + [Gradient]_EmissionMap ("Emission Map", 2D) = "white" { } + [ToggleUI]_EmissionBaseColorAsMap ("Base Color as Map?", Float) = 0 + [HideInInspector][Vector2]_EmissionMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _EmissionMapUV ("UV", Int) = 0 + _EmissionMask ("Emission Mask", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _EmissionMaskUV ("UV", Int) = 0 + _EmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [ToggleUI]_EmissionHueShiftEnabled ("Enable Hue Shift", Float) = 0 + _EmissionHueShift ("Hue Shift", Range(0, 1)) = 0 + _EmissionHueShiftSpeed ("Hue Shift Speed", Float) = 0 + + // Center out emission + [HideInInspector] m_start_CenterOutEmission ("Center Out Emission", Float) = 0 + [HideInInspector][ToggleUI]_EmissionCenterOutEnabled ("Enable Center Out", Float) = 0 + _EmissionCenterOutSpeed ("Flow Speed", Float) = 5 + [HideInInspector] m_end_CenterOutEmission ("inward out emission", Float) = 0 + + // Glow in the dark Emission + [HideInInspector] m_start_glowInDarkEmissionOptions ("Glow In The Dark Emission (Requires Lighting Enabled)", Float) = 0 + [HideInInspector][ToggleUI]_EnableGITDEmission ("Enable Glow In The Dark", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh ("Lighting Type", Int) = 0 + _GITDEMinEmissionMultiplier ("Min Emission Multiplier", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier ("Max Emission Multiplier", Range(0, 1)) = 0 + _GITDEMinLight ("Min Lighting", Range(0, 1)) = 0 + _GITDEMaxLight ("Max Lighting", Range(0, 1)) = 1 + [HideInInspector] m_end_glowInDarkEmissionOptions ("Glow In The Dark Emission (Requires Lighting Enabled)", Float) = 0 + + // Blinking Emission + [HideInInspector] m_start_blinkingEmissionOptions ("Blinking Emission", Float) = 0 + [HideInInspector][ToggleUI]_EmissionBlinkingEnabled ("Enable Blinking", Float) = 0 + _EmissiveBlink_Min ("Emissive Blink Min", Float) = 0 + _EmissiveBlink_Max ("Emissive Blink Max", Float) = 1 + _EmissiveBlink_Velocity ("Emissive Blink Velocity", Float) = 4 + _EmissionBlinkingOffset ("Offset", Float) = 0 + [HideInInspector] m_end_blinkingEmissionOptions ("Blinking Emission", Float) = 0 + + // Scrolling Emission + [HideInInspector] m_start_scrollingEmissionOptions ("Scrolling Emission", Float) = 0 + [HideInInspector][ToggleUI] _ScrollingEmission ("Enable Scrolling Emission", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve ("Use Curve", float) = 0 + [Curve]_EmissionScrollingCurve ("Curve", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor ("VColor as position", float) = 0 + _EmissiveScroll_Direction ("Direction", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width ("Width", Float) = 10 + _EmissiveScroll_Velocity ("Velocity", Float) = 10 + _EmissiveScroll_Interval ("Interval", Float) = 20 + _EmissionScrollingOffset ("Offset", Float) = 0 + [HideInInspector] m_end_scrollingEmissionOptions ("Scrolling Emission", Float) = 0 + + // Emission Audio Link + [HideInInspector] m_start_EmissionAudioLink ("Audio Link ♫--{is_hideable:true, condition_showS:_EnableAudioLink==1}", Float) = 0 + [ToggleUI] _EnableEmissionStrengthAudioLink ("multiply Emission Strength", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmissionStrengthBand ("Emission Strength Band", Int) = 0 + [ToggleUI] _EnableEmissionCenterOutAudioLink ("Center Out multipy", Float) = 0 + _EmissionCenterOutAudioLinkWidth("C Out Mul Duration", Range(0,1)) = 1 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmissionCenterOutBand ("Center Out M Band", Int) = 0 + [Vector2] _EmissionCenterOutAddAudioLink ("Center Out Add", Vector) = (0,0,0,0) + _EmissionCenterOutAddAudioLinkwidth("C Out Add Duration", Range(0,1)) = 1 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmissionCenterOutAddBand ("Center Out A Band", Int) = 0 + [Vector2]_AudioLinkAddEmission ("Emission Strength Add", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkAddEmissionBand ("Emission Add Band", Int) = 0 + [HideInInspector] m_end_EmissionAudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_emissionOptions ("Emission / Glow", Float) = 0 + + // Second Enission + [HideInInspector] m_start_emission1Options ("Emission / Glow 2 (Requires Emission 1 Enabled)", Float) = 0 + [ThryToggle(EFFECT_HUE_VARIATION)]_EnableEmission1 ("Enable Emission 2", Float) = 0 + [HDR]_EmissionColor1 ("Emission Color", Color) = (1, 1, 1, 1) + [Gradient]_EmissionMap1 ("Emission Map", 2D) = "white" { } + [ToggleUI]_EmissionBaseColorAsMap1 ("Base Color as Map?", Float) = 0 + [HideInInspector][Vector2]_EmissionMap1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _EmissionMap1UV ("UV", Int) = 0 + _EmissionMask1 ("Emission Mask", 2D) = "white" { } + [HideInInspector][Vector2]_EmissionMask1Pan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _EmissionMask1UV ("UV", Int) = 0 + _EmissionStrength1 ("Emission Strength", Range(0, 20)) = 0 + [ToggleUI]_EmissionHueShiftEnabled1 ("Enable Hue Shift", Float) = 0 + _EmissionHueShift1 ("Hue Shift", Range(0, 1)) = 0 + _EmissionHueShiftSpeed1 ("Hue Shift Speed", Float) = 0 + + + // Second Center Out Enission + [HideInInspector] m_start_CenterOutEmission1 ("Center Out Emission", Float) = 0 + [HideInInspector][ToggleUI]_EmissionCenterOutEnabled1 ("Enable Center Out", Float) = 0 + _EmissionCenterOutSpeed1 ("Flow Speed", Float) = 5 + [HideInInspector] m_end_CenterOutEmission1 ("inward out emission", Float) = 0 + + // Second Glow In The Dark Emission + [HideInInspector] m_start_glowInDarkEmissionOptions1 ("Glow In The Dark Emission (Requires Lighting Enabled)", Float) = 0 + [HideInInspector][ToggleUI]_EnableGITDEmission1 ("Enable Glow In The Dark", Float) = 0 + [Enum(World, 0, Mesh, 1)] _GITDEWorldOrMesh1 ("Lighting Type", Int) = 0 + _GITDEMinEmissionMultiplier1 ("Min Emission Multiplier", Range(0, 1)) = 1 + _GITDEMaxEmissionMultiplier1 ("Max Emission Multiplier", Range(0, 1)) = 0 + _GITDEMinLight1 ("Min Lighting", Range(0, 1)) = 0 + _GITDEMaxLight1 ("Max Lighting", Range(0, 1)) = 1 + [HideInInspector] m_end_glowInDarkEmissionOptions1 ("Glow In The Dark Emission (Requires Lighting Enabled)", Float) = 0 + + // Second Blinking Emission + [HideInInspector] m_start_blinkingEmissionOptions1 ("Blinking Emission", Float) = 0 + [HideInInspector][ToggleUI]_EmissionBlinkingEnabled1 ("Enable Blinking", Float) = 0 + _EmissiveBlink_Min1 ("Emissive Blink Min", Float) = 0 + _EmissiveBlink_Max1 ("Emissive Blink Max", Float) = 1 + _EmissiveBlink_Velocity1 ("Emissive Blink Velocity", Float) = 4 + _EmissionBlinkingOffset1 ("Offset", Float) = 0 + [HideInInspector] m_end_blinkingEmissionOptions1 ("Blinking Emission", Float) = 0 + + // Scrolling Scrolling Emission + [HideInInspector] m_start_scrollingEmissionOptions1 ("Scrolling Emission", Float) = 0 + [HideInInspector][ToggleUI] _ScrollingEmission1 ("Enable Scrolling Emission", Float) = 0 + [ToggleUI]_EmissionScrollingUseCurve1 ("Use Curve", float) = 0 + [Curve]_EmissionScrollingCurve1 ("Curve", 2D) = "white" { } + [ToggleUI]_EmissionScrollingVertexColor1 ("VColor as position", float) = 0 + _EmissiveScroll_Direction1 ("Direction", Vector) = (0, -10, 0, 0) + _EmissiveScroll_Width1 ("Width", Float) = 10 + _EmissiveScroll_Velocity1 ("Velocity", Float) = 10 + _EmissiveScroll_Interval1 ("Interval", Float) = 20 + _EmissionScrollingOffset1 ("Offset", Float) = 0 + [HideInInspector] m_end_scrollingEmission1Options ("Scrolling Emission", Float) = 0 + + // Emission Audio Link + [HideInInspector] m_start_Emission1AudioLink ("Audio Link ♫--{is_hideable:true, condition_showS:_EnableAudioLink==1}", Float) = 0 + [ToggleUI] _EnableEmission1StrengthAudioLink ("Emission Strength", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission1StrengthBand ("Emission Strength Band", Int) = 0 + [ToggleUI] _EnableEmission1CenterOutAudioLink ("Center Out multipy", Float) = 0 + _Emission1CenterOutAudioLinkWidth("C Out Mul Duration", Range(0,1)) = 1 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission1CenterOutBand ("Center Out Band", Int) = 0 + [Vector2] _EmissionCenterOutAddAudioLink1 ("Center Out Add", Vector) = (0,0,0,0) + _Emission1CenterOutAddAudioLinkwidth("C Out Add Duration", Range(0,1)) = 1 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkEmission1CenterOutAddBand ("Center Out A Band", Int) = 0 + [Vector2]_AudioLinkAddEmission1 ("Emission Strength Add", Vector) = (0, 0, 0, 0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkAddEmission1Band ("Emission Add Band", Int) = 0 + [HideInInspector] m_end_Emission1AudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_emission1Options ("Emission / Glow 2", Float) = 0 + // Flipbook + [HideInInspector] m_start_flipBook ("Flipbook", Float) = 0 + [ThryToggle(_SUNDISK_HIGH_QUALITY)]_EnableFlipbook ("Enable Flipbook", Float) = 0 + [ToggleUI]_FlipbookAlphaControlsFinalAlpha ("Flipbook Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookIntensityControlsAlpha ("Intensity Controls Alpha?", Float) = 0 + [ToggleUI]_FlipbookColorReplaces ("Color Replaces Flipbook", Float) = 0 + [TextureArray]_FlipbookTexArray ("Texture Array", 2DArray) = "" { } + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _FlipbookTexArrayUV ("UV", Int) = 0 + [HideInInspector][Vector2]_FlipbookTexArrayPan ("Panning", Vector) = (0, 0, 0, 0) + _FlipbookMask ("Mask", 2D) = "white" { } + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _FlipbookMaskUV ("UV", Int) = 0 + [HideInInspector][Vector2]_FlipbookMaskPan ("Panning", Vector) = (0, 0, 0, 0) + _FlipbookColor ("Color & alpha", Color) = (1, 1, 1, 1) + _FlipbookTotalFrames ("Total Frames", Float) = 1 + _FlipbookFPS ("FPS", Float) = 30.0 + _FlipbookScaleOffset ("Scale | Offset", Vector) = (1, 1, 0, 0) + [ToggleUI]_FlipbookTiled ("Tiled?", Float) = 0 + _FlipbookEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + _FlipbookRotation ("Rotation", Range(0, 360)) = 0 + _FlipbookRotationSpeed ("Rotation Speed", Float) = 0 + _FlipbookReplace ("Replace", Range(0, 1)) = 1 + _FlipbookMultiply ("Multiply", Range(0, 1)) = 0 + _FlipbookAdd ("Add", Range(0, 1)) = 0 + + //Flipbook audio link + [HideInInspector] m_start_FlipbookAudioLink ("Audio Link ♫--{is_hideable:true, condition_showS:_EnableAudioLink==1}", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkFlipbookScaleBand ("Scale Band", Int) = 0 + _AudioLinkFlipbookScale("Scale Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkFlipbookAlphaBand ("Alpha Band", Int) = 0 + [Vector2]_AudioLinkFlipbookAlpha("Alpha Mod", Vector) = (1,1,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkFlipbookEmissionBand ("Emission Band", Int) = 0 + [Vector2]_AudioLinkFlipbookEmission("Emission Mod", Vector) = (0,0,0,0) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkFlipbookFrameBand ("Frame Band", Int) = 0 + [Vector2]_AudioLinkFlipbookFrame("Frame control", Vector) = (0,0,0,0) + [HideInInspector] m_end_FlipbookAudioLink ("Audio Link", Float) = 0 + + // Flipbook Manual Control + [HideInInspector] m_start_manualFlipbookControl ("Manual Control", Float) = 0 + _FlipbookCurrentFrame ("Current Frame", Float) = -1 + [HideInInspector] m_end_manualFlipbookControl ("Manual Control", Float) = 0 + + [HideInInspector] m_start_crossfade ("Crossfade", Float) = 0 + [ToggleUI]_FlipbookCrossfadeEnabled("Enable Crossfade?", Float) = 0 + [MultiSlider]_FlipbookCrossfadeRange ("Fade Range", Vector) = (0.75, 1, 0, 1) + [HideInInspector] m_end_crossfade ("Crossfade", Float) = 0 + + [HideInInspector] m_start_flipbookHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_FlipbookHueShiftEnabled ("Enabled", Float) = 0 + _FlipbookHueShiftSpeed ("Shift Speed", Float) = 0 + _FlipbookHueShift ("Hue Shift", Range(0,1)) = 0 + [HideInInspector] m_end_flipbookHueShift ("Hue Shift", Float) = 0 + [HideInInspector] m_end_flipBook ("Flipbook", Float) = 0 + + // Dissolve + [HideInInspector] m_start_dissolve ("Dissolve", Float) = 0 + [ThryToggle(DISTORT)]_EnableDissolve ("Enable Dissolve", Float) = 0 + [Enum(Basic, 1, Point2Point, 2)] _DissolveType ("Dissolve Type", Int) = 1 + _DissolveEdgeWidth ("Edge Width", Range(0, .5)) = 0.025 + _DissolveEdgeHardness ("Edge Hardness", Range(0, 1)) = 0.5 + _DissolveEdgeColor ("Edge Color", Color) = (1, 1, 1, 1) + [Gradient]_DissolveEdgeGradient ("Edge Gradient", 2D) = "white" { } + _DissolveEdgeEmission ("Edge Emission", Range(0, 20)) = 0 + _DissolveTextureColor ("Dissolved Color", Color) = (1, 1, 1, 1) + _DissolveToTexture ("Dissolved Texture", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveToTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DissolveToTextureUV ("UV", Int) = 0 + _DissolveToEmissionStrength ("Dissolved Emission Strength", Range(0, 20)) = 0 + _DissolveNoiseTexture ("Dissolve Noise", 2D) = "white" { } + [HideInInspector][Vector2]_DissolveNoiseTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DissolveNoiseTextureUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertNoise ("Invert?", Float) = 0 + _DissolveDetailNoise ("Dissolve Detail Noise", 2D) = "black" { } + [HideInInspector][Vector2]_DissolveDetailNoisePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DissolveDetailNoiseUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveInvertDetailNoise ("Invert?", Float) = 0 + _DissolveDetailStrength ("Dissolve Detail Strength", Range(0, 1)) = 0.1 + _DissolveAlpha ("Dissolve Alpha", Range(0, 1)) = 0 + _DissolveMask ("Dissolve Mask", 2D) = "white" { } + [ToggleUI]_DissolveUseVertexColors ("VertexColor.g Mask", Float) = 0 + [HideInInspector][Vector2]_DissolveMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DissolveMaskUV ("UV", Int) = 0 + [HideInInspector][ToggleUI]_DissolveMaskInvert ("Invert?", Float) = 0 + _ContinuousDissolve ("Continuous Dissolve Speed", Float) = 0 + [HideInInspector] m_start_dissolveMasking ("Effect Masking", Float) = 0 + [Enum(Undissolved, 0, Dissolved, 1, Both, 2)] _DissolveEmissionSide ("Emission 1", Int) = 2 + [Enum(Undissolved, 0, Dissolved, 1, Both, 2)] _DissolveEmission1Side ("Emission 2", Int) = 2 + [HideInInspector] m_end_dissolveMasking ("Effect Masking", Float) = 0 + + // Point to Point Dissolve + [HideInInspector] m_start_pointToPoint ("point to point", Float) = 0 + [Enum(Local, 0, World, 1, Vertex Colors, 2)] _DissolveP2PWorldLocal ("World/Local", Int) = 0 + _DissolveP2PEdgeLength ("Edge Length", Float) = 0.1 + [Vector3]_DissolveStartPoint ("Start Point", Vector) = (0, -1, 0, 0) + [Vector3]_DissolveEndPoint ("End Point", Vector) = (0, 1, 0, 0) + [HideInInspector] m_end_pointToPoint ("Point To Point", Float) = 0 + + [HideInInspector] m_start_dissolveHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_DissolveHueShiftEnabled ("Dissolved Enabled", Float) = 0 + _DissolveHueShiftSpeed ("Dissolved Speed", Float) = 0 + _DissolveHueShift ("Dissolved Shift", Range(0,1)) = 0 + [ToggleUI]_DissolveEdgeHueShiftEnabled ("Edge Enabled", Float) = 0 + _DissolveEdgeHueShiftSpeed ("Edge Speed", Float) = 0 + _DissolveEdgeHueShift ("Edge Shift", Range(0,1)) = 0 + [HideInInspector] m_end_dissolveHueShift ("Hue Shift", Float) = 0 + + // Locked in anim sldiers + [HideInInspector] m_start_BonusSliders ("Locked In Anim Sliders", Float) = 0 + _DissolveAlpha0 ("Dissolve Alpha 0", Range(-1, 1)) = 0 + _DissolveAlpha1 ("Dissolve Alpha 1", Range(-1, 1)) = 0 + _DissolveAlpha2 ("Dissolve Alpha 2", Range(-1, 1)) = 0 + _DissolveAlpha3 ("Dissolve Alpha 3", Range(-1, 1)) = 0 + _DissolveAlpha4 ("Dissolve Alpha 4", Range(-1, 1)) = 0 + _DissolveAlpha5 ("Dissolve Alpha 5", Range(-1, 1)) = 0 + _DissolveAlpha6 ("Dissolve Alpha 6", Range(-1, 1)) = 0 + _DissolveAlpha7 ("Dissolve Alpha 7", Range(-1, 1)) = 0 + _DissolveAlpha8 ("Dissolve Alpha 8", Range(-1, 1)) = 0 + _DissolveAlpha9 ("Dissolve Alpha 9", Range(-1, 1)) = 0 + [HideInInspector] m_end_BonusSliders ("Locked In Sliders", Float) = 0 + + [HideInInspector] m_start_dissolveAudioLink ("Audio Link ♫--{reference_property:_EnableDissolveAudioLink,is_hideable:true, condition_showS:_EnableAudioLink==1}", Float) = 0 + [HideInInspector][ToggleUI] _EnableDissolveAudioLink ("Enabled?", Float) = 0 + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveAlphaBand ("Dissolve Alpha Band", Int) = 0 + [MultiSlider]_AudioLinkDissolveAlpha ("Dissolve Alpha Mod", Vector) = (0, 0, -1, 1) + [Enum(Bass, 0, Low Mid, 1, High Mid, 2, Treble, 3)] _AudioLinkDissolveDetailBand ("Dissolve Detail Band", Int) = 0 + [MultiSlider]_AudioLinkDissolveDetail ("Dissolve Detail Mod", Vector) = (0, 0, -1, 1) + [HideInInspector] m_end_dissolveAudioLink ("Audio Link", Float) = 0 + [HideInInspector] m_end_dissolve ("Dissolve", Float) = 0 + + // Panosphere + [HideInInspector] m_start_panosphereOptions ("Panosphere / Cubemaps", Float) = 0 + [ThryToggle(_DETAIL_MULX2)]_PanoToggle ("Enable Panosphere", Float) = 0 + [ToggleUI]_PanoInfiniteStereoToggle ("Infinite Stereo", Float) = 0 + _PanosphereColor ("Color", Color) = (1, 1, 1, 1) + _PanosphereTexture ("Texture", 2D) = "white" { } + _PanoMask ("Mask", 2D) = "white" { } + [HideInInspector][Vector2]_PanoMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _PanoMaskUV ("UV", Int) = 0 + _PanoEmission ("Emission Strength", Range(0, 10)) = 0 + _PanoBlend ("Alpha", Range(0, 1)) = 0 + [Vector3]_PanospherePan ("Pan Speed", Vector) = (0, 0, 0, 0) + [ToggleUI]_PanoCubeMapToggle ("Use Cubemap", Float) = 0 + [TextureNoSO]_PanoCubeMap ("CubeMap", Cube) = "" { } + [HideInInspector] m_end_panosphereOptions ("Panosphere / Cubemaps", Float) = 0 + + // Glitter + [HideInInspector] m_start_glitter ("Glitter / Sparkle", Float) = 0 + [ThryToggle(_SUNDISK_SIMPLE)]_GlitterEnable ("Enable Glitter?", Float) = 0 + [Enum(Angle, 0, Linear Emission, 1)]_GlitterMode ("Mode", Int) = 0 + [Enum(Circle, 0, Square, 1)]_GlitterShape ("Shape", Int) = 0 + [Enum(Add, 0, Replace, 1)] _GlitterBlendType ("Blend Mode", Int) = 0 + [HDR]_GlitterColor ("Color", Color) = (1, 1, 1) + _GlitterUseSurfaceColor ("Use Surface Color", Range(0, 1)) = 0 + _GlitterColorMap ("Glitter Color Map", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterColorMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _GlitterColorMapUV ("UV", Int) = 0 + [HideInInspector][Vector2]_GlitterPan ("Panning", Vector) = (0, 0, 0, 0) + _GlitterMask ("Glitter Mask", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _GlitterMaskUV ("UV", Int) = 0 + _GlitterTexture ("Glitter Texture--{reference_properties:[_GlitterTexturePan]}", 2D) = "white" { } + [HideInInspector][Vector2]_GlitterTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [Vector2]_GlitterUVPanning ("Panning Speed", Vector) = (0,0,0,0) + _GlitterTextureRotation ("Rotation Speed", Float) = 0 + _GlitterFrequency ("Glitter Density", Float) = 300.0 + _GlitterJitter ("Glitter Jitter", Range(0, 1)) = 1.0 + _GlitterSpeed ("Glitter Speed", Float) = 10.0 + _GlitterSize ("Glitter Size", Range(0, 1)) = .3 + _GlitterContrast ("Glitter Contrast--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==0}}", Range(1, 1000)) = 300 + _GlitterAngleRange ("Glitter Angle Range--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==0}}", Range(0, 90)) = 90 + _GlitterMinBrightness ("Glitter Min Brightness", Range(0, 1)) = 0 + _GlitterBrightness ("Glitter Max Brightness", Range(0, 40)) = 3 + _GlitterBias ("Glitter Bias--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==0}}", Range(0, 1)) = .8 + _GlitterHideInShadow("Hide in shadow", Range(0,1)) = 0 + _GlitterCenterSize ("dim light--{condition_show:{type:AND,condition1:{type:PROPERTY_BOOL,data:_GlitterMode==1},condition2:{type:PROPERTY_BOOL,data:_GlitterShape==1}}}", Range(0, 1)) = .08 + _glitterFrequencyLinearEmissive ("Frequency--{condition_show:{type:PROPERTY_BOOL,data:_GlitterMode==1}}", Range(0, 100)) = 20 + _GlitterJaggyFix ("Jaggy Fix--{condition_show:{type:PROPERTY_BOOL,data:_GlitterShape==1}}", Range(0, .1)) = .0 + + [HideInInspector] m_start_glitterHueShift ("Hue Shift", Float) = 0 + [ToggleUI]_GlitterHueShiftEnabled ("Enabled", Float) = 0 + _GlitterHueShiftSpeed ("Shift Speed", Float) = 0 + _GlitterHueShift ("Hue Shift", Range(0,1)) = 0 + [HideInInspector] m_end_glitterHueShift ("Hue Shift", Float) = 0 + + // Glitter Random Colors + [HideInInspector] m_start_glitterRandom ("Random Things", Float) = 0 + [ToggleUI]_GlitterRandomColors ("Random Colors", Float) = 0 + [MultiSlider]_GlitterMinMaxSaturation ("Saturation Range", Vector) = (0.8, 1, 0, 1) + [MultiSlider]_GlitterMinMaxBrightness ("Brightness Range", Vector) = (0.8, 1, 0, 1) + [ToggleUI]_GlitterRandomSize("Random Size?", Float) = 0 + [MultiSlider]_GlitterMinMaxSize ("Size Range", Vector) = (0.1, 0.5, 0, 1) + [ToggleUI]_GlitterRandomRotation("Random Tex Rotation", Float) = 0 + [HideInInspector] m_end_glitterRandom ("Random Colors", Float) = 0 + [HideInInspector] m_end_glitter ("Glitter / Sparkle", Float) = 0 + + // MSDF OVERLAY + [HideInInspector] m_start_Text ("MSDF Text Overlay", Float) = 0 + _TextGlyphs ("Font Array", 2D) = "black" { } + _TextPixelRange ("Pixel Range", Float) = 4.0 + [ThryToggle(EFFECT_BUMP)]_TextEnabled ("Text?", Float) = 0 + + // FPS + [HideInInspector] m_start_TextFPS ("FPS", Float) = 0 + [ToggleUI]_TextFPSEnabled ("FPS Text?", Float) = 0 + [Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _TextFPSUV ("FPS UV", Int) = 0 + _TextFPSColor ("Color", Color) = (1, 1, 1, 1) + _TextFPSEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextFPSOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextFPSRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextFPSScale ("Scale", Vector) = (1, 1, 1, 1) + _TextFPSPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextFPS ("FPS", Float) = 0 + + // POSITION + [HideInInspector] m_start_TextPosition ("Position", Float) = 0 + [ToggleUI]_TextPositionEnabled ("Position Text?", Float) = 0 + [Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _TextPositionUV ("Position UV", Int) = 0 + //[ToggleUI]_TextPositionVertical ("Vertical?", Float) = 0 + _TextPositionColor ("Color", Color) = (1, 0, 1, 1) + _TextPositionEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextPositionOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextPositionRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextPositionScale ("Scale", Vector) = (1, 1, 1, 1) + _TextPositionPadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextPosition ("Position", Float) = 0 + + // INSTANCE TIME + [HideInInspector] m_start_TextInstanceTime ("Instance Time", Float) = 0 + [ToggleUI]_TextTimeEnabled ("Time Text?", Float) = 0 + [Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _TextTimeUV ("Time UV", Int) = 0 + _TextTimeColor ("Color", Color) = (1, 0, 1, 1) + _TextTimeEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Vector2]_TextTimeOffset ("Offset", Vector) = (0, 0, 0, 0) + _TextTimeRotation ("Rotation", Range(0, 360)) = 0 + [Vector2]_TextTimeScale ("Scale", Vector) = (1, 1, 1, 1) + _TextTimePadding ("Padding Reduction", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_TextInstanceTime ("Instance Time", Float) = 0 + [HideInInspector] m_end_Text ("MSDF Text Overlay", Float) = 0 + + // Mirror Rendering + [HideInInspector] m_start_mirrorOptions ("Mirror", Float) = 0 + [ThryToggle(_REQUIRE_UV2)]_EnableMirrorOptions ("Enable Mirror Options", Float) = 0 + [Enum(ShowInBoth, 0, ShowOnlyInMirror, 1, DontShowInMirror, 2)] _Mirror ("Show in mirror", Int) = 0 + [ToggleUI]_EnableMirrorTexture ("Enable Mirror Texture", Float) = 0 + _MirrorTexture ("Mirror Tex", 2D) = "white" { } + [HideInInspector][Vector2]_MirrorTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _MirrorTextureUV ("UV", Int) = 0 + [HideInInspector] m_end_mirrorOptions ("Mirror", Float) = 0 + + // Distance Fade + [HideInInspector] m_start_distanceFade ("Distance Fade", Float) = 0 + _MainMinAlpha ("Minimum Alpha", Range(0, 1)) = 0 + _MainFadeTexture ("Fade Mask", 2D) = "white" { } + [HideInInspector][Vector2]_MainFadeTexturePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _MainFadeTextureUV ("UV", Int) = 0 + [Vector2]_MainDistanceFade ("Distance Fade X to Y", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_distanceFade ("Distance Fade", Float) = 0 + + // Angular Fade + [HideInInspector] m_start_angularFade ("Angular Fade", Float) = 0 + [ThryToggle(_SUNDISK_NONE)]_EnableRandom ("Enable Angular Fade", Float) = 0 + [Enum(Camera Face Model, 0, Model Face Camera, 1, Face Each Other, 2)] _AngleType ("Angle Type", Int) = 0 + [Enum(Model, 0, Vertex, 1)] _AngleCompareTo ("Model or Vert Positon", Int) = 0 + [Vector3]_AngleForwardDirection ("Forward Direction", Vector) = (0, 0, 1, 0) + _CameraAngleMin ("Camera Angle Min", Range(0, 180)) = 45 + _CameraAngleMax ("Camera Angle Max", Range(0, 180)) = 90 + _ModelAngleMin ("Model Angle Min", Range(0, 180)) = 45 + _ModelAngleMax ("Model Angle Max", Range(0, 180)) = 90 + _AngleMinAlpha ("Min Alpha", Range(0, 1)) = 0 + [HideInInspector] m_end_angularFade ("Angular Fade", Float) = 0 + + // UV Distortion + [HideInInspector] m_start_distortionFlow ("UV Distortion", Float) = 0 + [ThryToggle(USER_LUT)] _EnableDistortion ("Enabled?", Float) = 0 + _DistortionMask ("Mask--{reference_properties:[_DistortionMaskPan, _DistortionMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DistortionMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _DistortionMaskUV ("UV", Int) = 0 + _DistortionFlowTexture ("Distortion Texture 1", 2D) = "black" { } + _DistortionFlowTexture1 ("Distortion Texture 2", 2D) = "black" { } + _DistortionStrength ("Strength1", Float) = 0.5 + _DistortionStrength1 ("Strength2", Float) = 0.5 + [Vector2]_DistortionSpeed ("Speed1", Vector) = (0.5, 0.5, 0, 0) + [Vector2]_DistortionSpeed1 ("Speed2", Vector) = (0.5, 0.5, 0, 0) + [HideInInspector] m_end_distortionFlow ("UV Distortion", Float) = 0 + + // Audio link + [HideInInspector] m_start_audioLink ("Audio Link--{reference_property:_EnableAudioLink,is_hideable:true}", Float) = 0 + [HideInInspector][ThryToggle(COLOR_GRADING_LOG_VIEW)] _EnableAudioLink ("Enabled?", Float) = 0 + [Helpbox(1)] _AudioLinkHelp ("This section houses the global controls for audio link. Controls for individual features are in their respective sections. (Emission and Dissolve)", Int) = 0 + _AudioLinkDelay ("Delay", Range(0,1)) = 0 + [ToggleUI]_AudioLinkAveraging ("Enable averaging", Float) = 0 + _AudioLinkAverageRange ("Average Sampling Range", Range(0,1)) = .5 + // Debug + [HideInInspector] m_start_audioLinkDebug ("Debug--{reference_property:_EnableAudioLinkDebug,is_hideable:true}", Float) = 0 + [HideInInspector][ToggleUI] _EnableAudioLinkDebug("Enable?", Float) = 0 + _AudioLinkDebugTreble ("Treble", Range(0,1)) = 0 + _AudioLinkDebugHighMid ("High Mid", Range(0,1)) = 0 + _AudioLinkDebugLowMid ("Low Mid", Range(0,1)) = 0 + _AudioLinkDebugBass ("Bass", Range(0,1)) = 0 + [ToggleUI] _AudioLinkDebugAnimate ("Debug Animate", Float) = 0 + [ToggleUI]_AudioLinkTextureVisualization("Visualize Texture", Float) = 0 + [HideInInspector] m_end_audioLinkDebug ("Debug", Float) = 0 + [HideInInspector] m_end_audioLink ("Audio Link", Float) = 0 + + // Start Patreon + [HideInInspector] m_Patreon ("Patreon--{is_hideable:true}", Float) = 0 + + // Video Options + [HideInInspector] m_start_Video ("Video--{reference_property:_EnableVideo,is_hideable:true}", Float) = 0 + [ThryToggle(BLOOM)] _EnableVideo ("Enable Video", Float) = 0 + [Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _VideoUVNumber ("Screen UV#", Int) = 0 + [Enum(LCD, 0, TN, 1, CRT, 2, OLED, 3, Gameboy, 4, Projector, 5)] _VideoType ("Screen Type", Int) = 3 + _VideoBacklight ("Brightness", Range(0, 100)) = 1 + [ToggleUI]_VideoEmissionEnabled ("Emission Enabled", Float) = 1 + _VideoPixelTexture ("Pixel Texture", 2D) = "white" { } + [Vector2]_VideoResolution ("Resolution", Vector) = (1280, 720, 0) + _VideoMaskTexture ("Mask", 2D) = "white" { } + [Vector2]_VideoMaskPanning ("Mask Pan Speed", Vector) = (0, 0, 0, 0) + [HideInInspector] m_start_VideoSettings ("Video Texture Settings", Float) = 0 + [ToggleUI]_VideoEnableVideoPlayer ("Enable Video Player", Float) = 0 + [ToggleUI]_VideoPixelateToResolution ("Pixelate To Resolution", Float) = 0 + [ToggleUI]_VideoRepeatVideoTexture ("Clamp To UV", Float) = 0 + [Vector2]_VideoPanning ("Panning Speed", Vector) = (0, 0, 0, 0) + [Vector2]_VideoTiling ("Tiling", Vector) = (1, 1, 0, 0) + [Vector2]_VideoOffset ("Offset", Vector) = (0, 0, 0, 0) + _VideoSaturation ("Saturation", Range(-1, 3)) = 0 + _VideoContrast ("Contrast boost", Range(0, 3)) = 0 + [HideInInspector] m_end_VideoSettings ("Video Texture Settings", Float) = 0 + [HideInInspector] m_start_VideoDebug ("Video Debug", Float) = 0 + [ToggleUI]_VideoEnableDebug ("Enable Debug", Float) = 0 + _VideoDebugTexture ("Video Debug Tex", 2D) = "white" { } + [HideInInspector] m_end_VideoDebug ("Video Debug", Float) = 0 + [HideInInspector] m_start_CRT ("CRT Options", Float) = 0 + _VideoCRTRefreshRate ("Refresh Rate", Float) = 24 + _VideoCRTPixelEnergizedTime ("Pixel Fade Time", Float) = 1.9 + [HideInInspector] m_end_CRT ("CRT Options", Float) = 0 + [HideInInspector] m_start_Gameboy ("Gameboy Options", Float) = 0 + [Gradient]_VideoGameboyRamp ("Color Ramp", 2D) = "white" { } + [HideInInspector] m_end_Gameboy ("Gameboy Options", Float) = 0 + [HideInInspector] m_end_Video ("Video", Float) = 0 + + // TouchFX + [HideInInspector] m_start_TouchOptions ("Touch FX", Float) = 0 + [HideInInspector] m_start_Bulge ("Bulge--{reference_property:_EnableBulge,is_hideable:true}", Float) = 0 + [ThryToggle(BLOOM_LOW)] _EnableBulge ("Bulge", Float) = 0 + _BulgeMask ("Bulge Mask", 2D) = "white" { } + _BuldgeFadeLength ("Touch Distance", Float) = 0.02 + _BuldgeHeight ("Bulge Height", Range(-0.2, 0.2)) = 0.02 + [HideInInspector] m_end_Bulge ("Bulge", Float) = 0 + + [HideInInspector] m_start_TouchGlow ("Touch Color--{reference_property:_EnableTouchGlow, is_hideable:true}", Float) = 0 + [HideInInspector][ThryToggle(GRAIN)]_EnableTouchGlow ("Enable Touch Color", Float) = 0 + [Enum(Depth, 0, UVs, 1)] _DepthGradientTextureUV ("UVs From", Int) = 0 + [Enum(Replace, 0, Add, 1, Multiply, 2)] _DepthGradientBlend ("Color Blend", Int) = 0 + _DepthGlowColor ("Depth Glow Color", Color) = (1, 1, 1, 1) + [Gradient]_DepthGradient ("Depth Gradient--{reference_properties:[_DepthGradientPan, _DepthGradientUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthGradientPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DepthGradientUV ("UV", Int) = 0 + _DepthMask ("Depth Mask--{reference_properties:[_DepthMaskPan, _DepthMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_DepthMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _DepthMaskUV ("UV", Int) = 0 + _DepthGlowEmission ("Depth Glow Emission", Float) = 3 + _FadeLength ("Fade Length", Float) = 20 + _DepthAlphaMin ("Alpha Min", Range(0, 1)) = 1 + _DepthAlphaMax ("Alpha Max", Range(0, 1)) = 1 + [HideInInspector] m_end_TouchGlow ("Touch Color", Float) = 0 + [HideInInspector] m_end_TouchOptions ("Touch FX", Float) = 0 + + // Hologram + [HideInInspector] m_start_Hologram ("Hologram Alpha--{reference_property:_EnableHolo, is_hideable:true}", Float) = 0 + [ThryToggle(DEPTH_OF_FIELD)]_EnableHolo ("Enable Hologram Alpha", Float) = 0 + [Curve]_HoloAlphaMap ("Alpha Map", 2D) = "white" { } + [Enum(World Space, 0, Local Space, 1, UV, 2)]_HoloCoordinateSpace ("Coordinate Space", Int) = 0 + _HoloDirection ("Scroll Direction", Vector) = (0, 1, 0) + _HoloLineDensity ("Line Density", Float) = 10 + _HoloScrollSpeed ("Scroll Speed", Float) = 1 + [HideInInspector] m_start_FresnelAlpha ("Fresnel Alpha", Float) = 0 + _HoloFresnelAlpha ("Intensity", Range(0, 1)) = 0 + _HoloRimSharpness ("Sharpness", Range(0, 1)) = .5 + _HoloRimWidth ("Width", Range(0, 1)) = .5 + [HideInInspector] m_end_FresnelAlpha ("Fresnel Alpha", Float) = 0 + [HideInInspector] m_end_Hologram ("Hologram Alpha", Float) = 0 + + // GrabPass + [HideInInspector] m_start_GrabPass ("GrabPass Transparency--{reference_property:_commentIfZero_EnableGrabpass, is_hideable:true}", Float) = 0 + [ToggleUI] _commentIfZero_EnableGrabpass ("Enable GrabPass", Float) = 0 + [ToggleUI]_GrabPassUseAlpha ("Use Alpha", Float) = 1 + _GrabPassBlendMap ("Blend Map--{reference_properties:[_GrabPassBlendMapPan, _GrabPassBlendMapUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_GrabPassBlendMapPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _GrabPassBlendMapUV ("UV", Int) = 0 + _GrabPassBlendFactor ("Blend Amount", Range(0,1)) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _GrabSrcBlend ("Source Blend", Int) = 2 + [Enum(UnityEngine.Rendering.BlendMode)] _GrabDstBlend ("Destination Blend", Int) = 0 + [HideInInspector] m_start_Refraction ("Refraction--{reference_property:_RefractionEnabled, is_hideable:true}", Float) = 0 + [ToggleUI] _RefractionEnabled ("Enable Refraction,", Float) = 0 + _RefractionIndex ("Refraction", Range(0, 3)) = 1.333333 + _RefractionChromaticAberattion ("Chromatic Aberration", Range(0, 1)) = 0 + [HideInInspector] m_end_Refraction ("Refraction", Float) = 0 + [HideInInspector] m_start_Blur ("Blur--{reference_property:_EnableBlur, is_hideable:true}", Float) = 0 + [ThryToggle(CHROMATIC_ABERRATION_LOW)]_EnableBlur ("Enable Blur", Float) = 0 + _GrabBlurDistance ("Blur Distance", Range(0, 1)) = 0 + [IntRange]_GrabBlurQuality ("Blur Quality", Range(1, 10)) = 2 + [IntRange]_GrabBlurDirections ("Blur Directions", Range(1, 10)) = 4 + [HideInInspector] m_end_Blur ("Blur", Float) = 0 + [HideInInspector] m_end_GrabPass ("GrabPass Transparency", Float) = 0 + + // Iridescence + [HideInInspector] m_start_Iridescence ("Iridescence--{reference_property:_EnableIridescence, is_hideable:true}", Float) = 0 + [ThryToggle(BLOOM_LENS_DIRT)]_EnableIridescence ("Enable Iridescence", Float) = 0 + [Gradient]_IridescenceRamp ("Ramp", 2D) = "white" { } + [ToggleUI]_IridescenceNormalToggle ("Custom Normals?", Float) = 0 + [Normal]_IridescenceNormalMap ("Normal Map", 2D) = "bump" { } + _IridescenceMask ("Mask", 2D) = "white" { } + _IridescenceNormalIntensity ("Normal Intensity", Range(0, 10)) = 1 + [Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _IridescenceNormalUV ("Normal UV", Int) = 0 + [Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _IridescenceMaskUV ("Mask UV", Int) = 0 + [Enum(vertex, 0, pixel, 1)] _IridescenceNormalSelection ("Normal Select", Int) = 1 + _IridescenceIntensity ("Intensity", Range(0, 10)) = 1 + _IridescenceAddBlend ("Blend Add", Range(0, 1)) = 0 + _IridescenceReplaceBlend ("Blend Replace", Range(0, 1)) = 0 + _IridescenceMultiplyBlend ("Blend Multiply", Range(0, 1)) = 0 + _IridescenceEmissionStrength ("Emission Strength", Range(0, 20)) = 0 + [Enum(Run Early, 0, Run Late, 1)] _IridescenceTime ("When To Run", Int) = 0 + [HideInInspector] m_end_Iridescence ("Iridescence", Float) = 0 + + // Vertex Glitching + [HideInInspector] m_start_VertexGlitch ("Vertex Glitching--{reference_property:_EnableVertexGlitch, is_hideable:true}", Float) = 0 + [ToggleUI]_EnableVertexGlitch ("Enable Vertex Glitching", Float) = 0 + _VertexGlitchFrequency ("Glitch Interval", Float) = 0 + _VertexGlitchThreshold ("Glitch Threshold", Range(0, 1)) = 1 + _VertexGlitchStrength ("Glitch Strength", Range(0, 10)) = 1 + [HideInInspector] m_end_VertexGlitch ("Vertex Glitching", Float) = 0 + + // Spawn In Effects + [HideInInspector] m_start_Spawns ("Spawns", Float) = 0 + [HideInInspector] m_start_ScifiSpawnIn ("Sci Fi--{reference_property:_EnableScifiSpawnIn, is_hideable:true}", Float) = 0 + [ToggleUI]_EnableScifiSpawnIn ("Enable Sci Fi Spawn", Float) = 0 + _SpawnInNoise ("Spawn Noise", 2D) = "black" { } + _SpawnInNoiseIntensity ("Noise Intensity", Range(0, 1)) = .35 + _SpawnInAlpha ("Spawn Alpha", Range(0, 1)) = 0 + [Vector3]_SpawnInGradientStart ("Gradient Start", Vector) = (0, 2, 0) + [Vector3]_SpawnInGradientFinish ("Gradient End", Vector) = (0, -2, 0) + [HDR]_SpawnInEmissionColor ("Emission Color", Color) = (1, 1, 1) + _SpawnInEmissionOffset ("Emission Width", Range(0, 1)) = .1 + _SpawnInVertOffset ("Vertex Offset Speed", Float) = 10 + _SpawnInVertOffsetOffset ("vert width", Range(0, 1)) = .1 + [HideInInspector] m_end_SciFiSpawnIn ("Sci Fi", Float) = 0 + [HideInInspector] m_end_Spawns ("Spawns", Float) = 0 + + // Voronoi + [HideInInspector] m_start_Voronoi ("Voronoi--{reference_property:_EnableVoronoi, is_hideable:true}", Float) = 0 + [Enum(2D(Fast), 0, 3D(Fast with color bugs), 1, 3D(slow but no bugs), 2)] _VoronoiType ("Type", Int) = 1 + [Enum(Local, 0, World, 1, UV, 2)] _VoronoiSpace ("Space", Int) = 0 + [Enum(Color and Emission, 0, Just Emission, 1)] _VoronoiBlend ("Blend", Int) = 0 + [ThryToggle(CHROMATIC_ABERRATION)]_EnableVoronoi ("Enable Voronoi", Float) = 0 + [ToggleUI]_VoronoiEffectsMaterialAlpha("Effects Material Alpha", Float) = 0 + _VoronoiMask ("Mask", 2D) = "white" { } + [HideInInspector][Vector2]_VoronoiMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _VoronoiMaskUV ("UV", Int) = 0 + _VoronoiNoise ("Edge Noise", 2D) = "black" { } + [HideInInspector][Vector2]_VoronoiNoisePan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _VoronoiNoiseUV ("UV", Int) = 0 + _VoronoiNoiseIntensity ("Noise Intensity", Range(0, 1)) = .1 + _VoronoiColor0 ("Color 0", Color) = (0, 0, 0, 1) + _VoronoiEmission0 ("Emission 0", Range(0, 20)) = 0 + _VoronoiColor1 ("Color 1", Color) = (1, 1, 1, 1) + _VoronoiEmission1 ("Emission 1", Range(0, 20)) = 0 + [Vector2]_VoronoiGradient ("Gradient", Vector) = (.04, .05, 0, 0) + _VoronoiScale ("Scale", Float) = 5 + [Vector3]_VoronoiSpeed ("Speed", Vector) = (3, 3, 3) + [HideInInspector] m_start_voronoiRandom ("Voronoi Random Cell Color--{reference_property:_VoronoiEnableRandomCellColor}", Float) = 0 + [ToggleUI]_VoronoiEnableRandomCellColor ("Rando Cell Col", Float) = 0 + [MultiSlider]_VoronoiRandomMinMaxSaturation ("Saturation Range", Vector) = (0.8, 1, 0, 1) + [MultiSlider]_VoronoiRandomMinMaxBrightness ("Brightness Range", Vector) = (0.8, 1, 0, 1) + [HideInInspector] m_end_voronoiRandom ("Voronoi Random Cell Color", Float) = 0 + [HideInInspector] m_end_Voronoi ("Vertex Glitching", Float) = 0 + + [HideInInspector] m_start_BlackLight ("Black Light Mask--{reference_property:_BlackLightMaskEnabled, is_hideable:true}", Float) = 0 + [HideInInspector][ThryToggle(_SPECULARHIGHLIGHTS_OFF)]_BlackLightMaskEnabled ("Black Light Mask Enabled", Float) = 0 + _BlackLightMaskKeys ("Mask Keys", Vector) = (2, 3, 4, 5) + _BlackLightMaskStart ("Gradient Start", Vector) = (0, 0, 0, 0) + _BlackLightMaskEnd ("Gradient End", Vector) = (1, 1, 1, 1) + [ToggleUI]_BlackLightMaskDebug ("Visualize", Float) = 0 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskMetallic ("Metallic", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskClearCoat ("Clear Coat", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskMatcap ("Matcap 1", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskMatcap2 ("Matcap 2", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskEmission ("Emission 1", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskEmission2 ("Emission 2", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskFlipbook ("Flipbook", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskDissolve ("Dissolve", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskPanosphere ("Panosphere", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskGlitter ("Glitter", Int) = 4 + [Enum(X, 0, Y, 1, Z, 2, W, 3, Off, 4)] _BlackLightMaskIridescence ("Iridescence", Int) = 4 + [HideInInspector] m_end_BlackLight ("Black Light", Float) = 0 + // End Patreon + + // Outline Options + [HideInInspector] m_outlineOptions ("Outlines", Float) = 0 + [ToggleUI]_commentIfZero_EnableOutlinePass ("Enable Outlines", float) = 0 + [Enum(Basic, 0, Tint, 1, Rim Light, 2, Directional, 3, DropShadow, 4)]_OutlineMode ("Mode", Int) = 0 + _OutlineTintMix ("Tint Mix--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==1}}", Range(0, 1)) = 0 + _OutlineRimLightBlend ("Rim Light Blend--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==2}}", Range(0, 1)) = 0 + _OutlinePersonaDirection ("directional Offset XY--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==3}}", Vector) = (1, 0, 0, 0) + _OutlineDropShadowOffset ("Drop Direction XY--{condition_show:{type:PROPERTY_BOOL,data:_OutlineMode==4}}", Vector) = (1, 0, 0, 0) + [ToggleUI]_OutlineFixedSize ("Fixed Size?", Float) = 0 + _OutlinesMaxDistance ("Fixed Size Max Distance", Float) = 9999 + [Enum(Off, 0, Normals, 1, Mask VC.r, 2)]_OutlineUseVertexColors ("Vertex Color", Float) = 0 + [ToggleUI]_OutlineLit ("Enable Lighting", Float) = 1 + _LineWidth ("Width", Float) = 0 + _LineColor ("Color", Color) = (1, 1, 1, 1) + _OutlineEmission ("Outline Emission", Float) = 0 + _OutlineTexture ("Outline Texture--{reference_properties:[_OutlineTexturePan, _OutlineTextureUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_OutlineTexturePan ("Outline Texture Pan", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _OutlineTextureUV ("UV", Int) = 0 + _OutlineMask ("Outline Mask--{reference_properties:[_OutlineMaskPan, _OutlineMaskUV]}", 2D) = "white" { } + [HideInInspector][Vector2]_OutlineMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _OutlineMaskUV ("UV", Int) = 0 + _OutlineShadowStrength ("Shadow Strength", Range(0, 1)) = 1 + [HideInInspector] m_start_outlineAdvanced ("Advanced", Float) = 0 + [Vector2]_OutlineFadeDistance ("Outline distance Fade", Vector) = (0, 0, 0, 0) + [Enum(UnityEngine.Rendering.CullMode)] _OutlineCull ("Cull", Float) = 1 + _OutlineOffsetFactor("Offset Factor", Float) = 0 + _OutlineOffsetUnits("Offset Units", Float) = 0 + [HideInInspector] m_end_outlineAdvanced ("Advanced", Float) = 0 + + // Parallax Mapping + [HideInInspector] m_ParallaxMap ("Parallax", Float) = 0 + [ThryToggle(_PARALLAXMAP)]_ParallaxMap ("Enable Parallax FX", Float) = 0 + [ToggleUI]_ParallaxHeightMapEnabled ("Enable Parallax Height", Float) = 0 + [ToggleUI]_ParallaxInternalMapEnabled ("Enable Parallax Internal", Float) = 0 + [HideInInspector] m_start_parallaxHeightmap ("Heightmap", Float) = 0 + [Vector2]_ParallaxHeightMapPan ("Pan", Vector) = (0, 0, 0, 0) + [Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3)] _ParallaxUV ("Parallax UV", Int) = 0 + _ParallaxHeightMap ("Height Map", 2D) = "black" { } + _ParallaxHeightMapMask ("Mask", 2D) = "white" { } + [HideInInspector][Vector2]_ParallaxHeightMapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _ParallaxHeightMapMaskUV ("UV", Int) = 0 + _ParallaxStrength ("Parallax Strength", Range(0, 1)) = 0 + [HideInInspector] m_end_parallaxHeightmap ("Heightmap", Float) = 0 + [HideInInspector] m_start_parallaxInternal ("Internal", Float) = 0 + [Enum(Basic, 0, HeightMap, 1)] _ParallaxInternalHeightmapMode ("Parallax Mode", Int) = 0 + [ToggleUI]_ParallaxInternalHeightFromAlpha ("HeightFromAlpha", Float) = 0 + _ParallaxInternalMap ("Internal Map", 2D) = "black" { } + _ParallaxInternalMapMask ("Mask", 2D) = "white" { } + [HideInInspector][Vector2]_ParallaxInternalMapMaskPan ("Panning", Vector) = (0, 0, 0, 0) + [HideInInspector][Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, DistortedUV1, 4)] _ParallaxInternalMapMaskUV ("UV", Int) = 0 + _ParallaxInternalIterations ("Parallax Internal Iterations", Range(1, 50)) = 1 + _ParallaxInternalMinDepth ("Min Depth", Float) = 0 + _ParallaxInternalMaxDepth ("Max Depth", Float) = 1 + _ParallaxInternalMinFade ("Min Depth Brightness", Range(0, 5)) = 0 + _ParallaxInternalMaxFade ("Max Depth Brightness", Range(0, 5)) = 1 + _ParallaxInternalMinColor ("Min Depth Color", Color) = (1, 1, 1, 1) + _ParallaxInternalMaxColor ("Max Depth Color", Color) = (1, 1, 1, 1) + [Vector2]_ParallaxInternalPanSpeed ("Pan Speed", Vector) = (0, 0, 0, 0) + [Vector2]_ParallaxInternalPanDepthSpeed ("Per Level Speed Multiplier", Vector) = (0, 0, 0, 0) + [HideInInspector] m_end_parallaxInternal ("Internal", Float) = 0 + [HideInInspector] m_start_parallaxAdvanced ("Advanced", Float) = 0 + _ParallaxBias ("Parallax Bias (0.42)", Float) = 0.42 + [HideInInspector] m_end_parallaxAdvanced ("Advanced", Float) = 0 + + [HideInInspector] m_thirdparty ("Third Party", Float) = 0 + // Raliv + [HideInInspector] m_start_raliv ("Raliv Dynamic Penetration System--{button_right:{text:Gumroad,action:{type:URL,data:https://gumroad.com/l/lwthuB},hover:Buy},is_hideable:true}", Float) = 0 + // Penetrator + [Helpbox(1)] _RalivHelp ("To use this you'll need to purchase the shader from the gumroad link in the header", Int) = 0 + [HideInInspector] m_start_ralivPenetrator ("Penetrator--{reference_property:_PenetratorEnabled}", Float) = 0 + [HideInInspector][ToggleUI] _PenetratorEnabled ("Enabled", Float) = 0 + _squeeze("squeeze", Range( 0 , 0.2)) = 0 + _SqueezeDist("SqueezeDist", Range( 0 , 0.1)) = 0 + _BulgeOffset("BulgeOffset", Range( 0 , 0.3)) = 0 + _BulgePower("BulgePower", Range( 0 , 0.01)) = 0 + _Length("Penetrator Length", Range( 0 , 3)) = 0 + _EntranceStiffness("EntranceStiffness", Range( 0.01 , 1)) = 0 + _Curvature("Curvature", Range( -1 , 1)) = 0 + _ReCurvature("ReCurvature", Range( -1 , 1)) = 0 + _WriggleSpeed("WriggleSpeed", Range( 0.1 , 30)) = 0.28 + _Wriggle("Wriggle", Range( 0 , 1)) = 0.28 + [HideInInspector] __dirty( "", Int ) = 1 + [HideInInspector] m_end_ralivPenetrator ("Penetrator", Float) = 0 + // Oriface + [HideInInspector] m_start_ralivOriface ("Oriface--{reference_property:_OrifaceEnabled}", Float) = 0 + [HideInInspector][ToggleUI] _OrifaceEnabled ("Enabled", Float) = 0 + _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 + [HideInInspector] m_end_ralivOriface ("Oriface", Float) = 0 + [HideInInspector] m_start_ralivAdvanced ("Advanced", Float) = 0 + [Helpbox(1)] _RalivAdvancedHelp ("An advanced user feature that allows a separate channel for penetrators and orifices (think toy radio controlled cars) 0s only interact with 0s and 1s only interact with 1s", Int) = 0 + _OrificeChannel("OrificeChannel Please Use 0", Float) = 0 + [HideInInspector] m_end_ralivAdvanced ("Advanced", Float) = 0 + [HideInInspector] m_end_raliv ("Raliv", Float) = 0 + + // Rendering Options + [HideInInspector] m_renderingOptions ("Rendering Options", Float) = 0 + [Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 2 + [Enum(UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Float) = 4 + [Enum(Off, 0, On, 1)] _ZWrite ("ZWrite", Int) = 1 + [Enum(Thry.ColorMask)] _ColorMask ("Color Mask", Int) = 15 + _OffsetFactor ("Offset Factor", Float) = 0.0 + _OffsetUnits ("Offset Units", Float) = 0.0 + [ToggleUI]_IgnoreFog ("Ignore Fog", Float) = 0 + [HideInInspector] Instancing ("Instancing", Float) = 0 //add this property for instancing variants settings to be shown + + // Blending Options + [HideInInspector] m_start_blending ("Blending", Float) = 0 + [Enum(Thry.BlendOp)]_BlendOp ("RGB Blend Op", Int) = 0 + [Enum(Thry.BlendOp)]_BlendOpAlpha ("Alpha Blend Op", Int) = 0 + [Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("Source Blend", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("Destination Blend", Int) = 0 + [HideInInspector] m_end_blending ("Blending", Float) = 0 + + // Stencils + [HideInInspector] m_start_StencilPassOptions ("Stencil", Float) = 0 + [IntRange] _StencilRef ("Stencil Reference Value", Range(0, 255)) = 0 + [IntRange] _StencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255 + [IntRange] _StencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilPassOp ("Stencil Pass Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilFailOp ("Stencil Fail Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _StencilZFailOp ("Stencil ZFail Op", Float) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _StencilCompareFunction ("Stencil Compare Function", Float) = 8 + [HideInInspector] m_end_StencilPassOptions ("Stencil", Float) = 0 + + // Outline Stencil + [HideInInspector] m_start_OutlineStencil ("Outline Stencil--{is_hideable:true, condition_show:{type:PROPERTY_BOOL,data:_commentIfZero_EnableOutlinePass==1}}", Float) = 0 + [IntRange] _OutlineStencilRef ("Stencil Reference Value", Range(0, 255)) = 0 + [IntRange] _OutlineStencilReadMask ("Stencil ReadMask Value", Range(0, 255)) = 255 + [IntRange] _OutlineStencilWriteMask ("Stencil WriteMask Value", Range(0, 255)) = 255 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilPassOp ("Stencil Pass Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilFailOp ("Stencil Fail Op", Float) = 0 + [Enum(UnityEngine.Rendering.StencilOp)] _OutlineStencilZFailOp ("Stencil ZFail Op", Float) = 0 + [Enum(UnityEngine.Rendering.CompareFunction)] _OutlineStencilCompareFunction ("Stencil Compare Function", Float) = 8 + [HideInInspector] m_end_OutlineStencil ("Outline Stencil", Float) = 0 + + // Debug Options + [HideInInspector] m_start_debugOptions ("Debug", Float) = 0 + [HideInInspector][ThryToggle(_COLOROVERLAY_ON)]_DebugEnabled ("Display Debug Info", Float) = 0 + _VertexUnwrap ("Unwrap", Range(0, 1)) = 0 + [Enum(Off, 0, Vertex Normal, 1, Pixel Normal, 2, Tangent, 3, Binormal, 4, Local 0 Distance, 5)] _DebugMeshData ("Mesh Data", Int) = 0 + [Enum(Off, 0, Attenuation, 1, Direct Lighting, 2, Indirect Lighting, 3, light Map, 4, Ramped Light Map, 5, Final Lighting, 6)] _DebugLightingData ("Lighting Data", Int) = 0 + [Enum(Off, 0, View Dir, 1, Tangent View Dir, 2, Forward Dir, 3, WorldPos, 4, View Dot Normal, 5)] _DebugCameraData ("Camera Data", Int) = 0 + [HideInInspector] m_end_debugOptions ("Debug", Float) = 0 + } + + + //originalEditorCustomEditor "PoiToon" + CustomEditor "Thry.ShaderEditor" + SubShader + { + Tags { "RenderType" = "Opaque" "Queue" = "Geometry+10" } +// //EnableGrabpass +// GrabPass +// { +// "_PoiGrab" +// } + //EnableGrabpass + + Pass + { + Name "MainPass" + Tags { "LightMode" = "ForwardBase" } + + Stencil + { + Ref [_StencilRef] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + + ZWrite [_ZWrite] + Cull [_Cull] + AlphaToMask [_AlphaToMask] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend [_SrcBlend] [_DstBlend] + + CGPROGRAM +#define OPTIMIZER_ENABLED +#define VIGNETTE_MASKED +#define _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A +#define PROPSHADER_IS_USING_THRY_EDITOR 69 +#define PROPSHADER_MASTER_LABEL 0 +#define PROPSHADER_PRESETS 0 +#define PROPSHADER_PROPERTIES_LABEL_FILE 0 +#define PROPFOOTER_YOUTUBE 0 +#define PROPFOOTER_TWITTER 0 +#define PROPFOOTER_PATREON 0 +#define PROPFOOTER_DISCORD 0 +#define PROPFOOTER_GITHUB 0 +#define PROP_FORGOTTOLOCKMATERIAL 1 +#define PROP_SHADEROPTIMIZERENABLED 1 +#define PROP_LOCKTOOLTIP 0 +#define PROP_MODE 0 +#define PROPM_MAINOPTIONS 1 +#define PROP_MAINTEX +#define PROP_MAINTEXTUREUV 0 +#define PROP_MAINEMISSIONSTRENGTH 0 +#define PROP_BUMPMAPUV 0 +#define PROP_BUMPSCALE 1 +#define PROP_CLIPPINGMASKUV 0 +#define PROP_INVERSE_CLIPPING 0 +#define PROPM_START_MAINHUESHIFT 0 +#define PROP_MAINCOLORADJUSTTEXTUREUV 0 +#define PROP_MAINHUESHIFTREPLACE 0 +#define PROP_MAINHUESHIFT 0 +#define PROP_MAINHUESHIFTSPEED 0 +#define PROP_SATURATION 0 +#define PROP_MAINBRIGHTNESS 0 +#define PROP_MAINHUESHIFTTOGGLE 0 +#define PROPM_END_MAINHUESHIFT 0 +#define PROPM_START_RGBMASK 0 +#define PROP_RGBMASKENABLED 0 +#define PROP_RGBUSEVERTEXCOLORS 0 +#define PROP_RGBBLENDMULTIPLICATIVE 0 +#define PROP_RGBMASKUV 0 +#define PROP_RGBRED_UV 0 +#define PROP_RGBGREEN_UV 0 +#define PROP_RGBBLUE_UV 0 +#define PROP_RGBNORMALSENABLED 0 +#define PROP_RGBNORMALBLEND 0 +#define PROP_RGBNORMALRUV 0 +#define PROP_RGBNORMALRSCALE 0 +#define PROP_RGBNORMALGUV 0 +#define PROP_RGBNORMALGSCALE 0 +#define PROP_RGBNORMALBUV 0 +#define PROP_RGBNORMALBSCALE 0 +#define PROPM_END_RGBMASK 0 +#define PROPM_START_DETAILOPTIONS 0 +#define PROP_DETAILENABLED 0 +#define PROP_DETAILMASKUV 0 +#define PROP_DETAILTEXUV 0 +#define PROP_DETAILTEXINTENSITY 1 +#define PROP_DETAILBRIGHTNESS 1 +#define PROP_DETAILNORMALMAPSCALE 1 +#define PROP_DETAILNORMALMAPUV 0 +#define PROPM_END_DETAILOPTIONS 0 +#define PROPM_START_MAINVERTEXCOLORS 0 +#define PROP_MAINVERTEXCOLORING 0 +#define PROP_MAINUSEVERTEXCOLORALPHA 0 +#define PROPM_END_MAINVERTEXCOLORS 0 +#define PROPM_START_VERTEXMANIPULATION 0 +#define PROP_VERTEXMANIPULATIONSENABLED 0 +#define PROP_VERTEXMANIPULATIONHEIGHT 0 +#define PROP_VERTEXMANIPULATIONHEIGHTUV 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBIAS 0 +#define PROP_VERTEXROUNDINGENABLED 0 +#define PROP_VERTEXROUNDINGDIVISION 500 +#define PROPM_END_VERTEXMANIPULATION 0 +#define PROPM_START_ALPHA 0 +#define PROP_CUTOFF 0.5 +#define PROP_DITHERINGENABLED 0 +#define PROP_DITHERGRADIENT 0.1 +#define PROP_FORCEOPAQUE 0 +#define PROP_MAINSHADOWCLIPMOD 0 +#define PROP_ALPHATOMASK 0 +#define PROP_MAINALPHATOCOVERAGE 0 +#define PROP_MAINMIPSCALE 0.25 +#define PROP_ALPHAPREMULTIPLY 0 +#define PROP_ALPHAMOD 0 +#define PROPM_END_ALPHA 0 +#define PROPM_START_DECALSECTION 0 +#define PROP_DECALMASKUV 0 +#define PROPM_START_DECAL0 0 +#define PROP_DECALENABLED 0 +#define PROP_DECALEMISSIONSTRENGTH 0 +#define PROP_DECALTEXTUREUV 0 +#define PROP_DECALTILED 0 +#define PROP_DECAL0DEPTH 0 +#define PROP_DECALROTATION 0 +#define PROP_DECALROTATIONSPEED 0 +#define PROP_DECALBLENDTYPE 0 +#define PROP_DECALBLENDALPHA 1 +#define PROP_DECALHUESHIFTENABLED 0 +#define PROP_DECALHUESHIFTSPEED 0 +#define PROP_DECALHUESHIFT 0 +#define PROPM_START_DECAL0AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL0SCALEBAND 0 +#define PROP_AUDIOLINKDECAL0ALPHABAND 0 +#define PROP_AUDIOLINKDECAL0EMISSIONBAND 0 +#define PROPM_END_DECAL0AUDIOLINK 0 +#define PROPM_END_DECAL0 0 +#define PROPM_START_DECAL1 0 +#define PROP_DECALENABLED1 0 +#define PROP_DECALEMISSIONSTRENGTH1 0 +#define PROP_DECALTEXTURE1UV 0 +#define PROP_DECALTILED1 0 +#define PROP_DECAL1DEPTH 0 +#define PROP_DECALROTATION1 0 +#define PROP_DECALROTATIONSPEED1 0 +#define PROP_DECALBLENDTYPE1 0 +#define PROP_DECALBLENDALPHA1 1 +#define PROP_DECALHUESHIFTENABLED1 0 +#define PROP_DECALHUESHIFTSPEED1 0 +#define PROP_DECALHUESHIFT1 0 +#define PROPM_START_DECAL1AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL1SCALEBAND 0 +#define PROP_AUDIOLINKDECAL1ALPHABAND 0 +#define PROP_AUDIOLINKDECAL1EMISSIONBAND 0 +#define PROPM_END_DECAL1AUDIOLINK 0 +#define PROPM_END_DECAL1 0 +#define PROPM_START_DECAL2 0 +#define PROP_DECALENABLED2 0 +#define PROP_DECALEMISSIONSTRENGTH2 0 +#define PROP_DECALTEXTURE2UV 0 +#define PROP_DECALTILED2 0 +#define PROP_DECAL2DEPTH 0 +#define PROP_DECALROTATION2 0 +#define PROP_DECALROTATIONSPEED2 0 +#define PROP_DECALBLENDTYPE2 0 +#define PROP_DECALBLENDALPHA2 1 +#define PROP_DECALHUESHIFTENABLED2 0 +#define PROP_DECALHUESHIFTSPEED2 0 +#define PROP_DECALHUESHIFT2 0 +#define PROPM_START_DECAL2AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL2SCALEBAND 0 +#define PROP_AUDIOLINKDECAL2ALPHABAND 0 +#define PROP_AUDIOLINKDECAL2EMISSIONBAND 0 +#define PROPM_END_DECAL2AUDIOLINK 0 +#define PROPM_END_DECAL2 0 +#define PROPM_START_DECAL3 0 +#define PROP_DECALENABLED3 0 +#define PROP_DECALEMISSIONSTRENGTH3 0 +#define PROP_DECALTEXTURE3UV 0 +#define PROP_DECALTILED3 0 +#define PROP_DECAL3DEPTH 0 +#define PROP_DECALROTATION3 0 +#define PROP_DECALROTATIONSPEED3 0 +#define PROP_DECALBLENDTYPE3 0 +#define PROP_DECALBLENDALPHA3 1 +#define PROP_DECALHUESHIFTENABLED3 0 +#define PROP_DECALHUESHIFTSPEED3 0 +#define PROP_DECALHUESHIFT3 0 +#define PROPM_START_DECAL3AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL3SCALEBAND 0 +#define PROP_AUDIOLINKDECAL3ALPHABAND 0 +#define PROP_AUDIOLINKDECAL3EMISSIONBAND 0 +#define PROPM_END_DECAL3AUDIOLINK 0 +#define PROPM_END_DECAL3 0 +#define PROPM_END_DECALSECTION 0 +#define PROPM_START_BACKFACE 0 +#define PROP_BACKFACEENABLED 0 +#define PROP_BACKFACETEXTUREUV 0 +#define PROP_BACKFACEDETAILINTENSITY 1 +#define PROP_BACKFACEHUESHIFT 0 +#define PROP_BACKFACEEMISSIONSTRENGTH 0 +#define PROPM_END_BACKFACE 0 +#define PROPM_LIGHTINGOPTIONS 1 +#define PROPM_START_LIGHTING 1 +#define PROP_ENABLELIGHTING 1 +#define PROP_LIGHTINGMODE 4 +#define PROP_LIGHTINGSTANDARDSMOOTHNESS 0 +#define PROP_LIGHTINGWRAPPEDWRAP 0 +#define PROP_LIGHTINGWRAPPEDNORMALIZATION 0 +#define PROP_LIGHTINGRAMPTYPE 0 +#define PROP_1ST_SHADEMAPUV 0 +#define PROP_USE_1STSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_1STSHADEMAPMASK_INVERSE 0 +#define PROP_USE_BASEAS1ST 0 +#define PROP_2ND_SHADEMAPUV 0 +#define PROP_USE_2NDSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_2NDSHADEMAPMASK_INVERSE 0 +#define PROP_USE_1STAS2ND 0 +#define PROP_BASECOLOR_STEP 0.5 +#define PROP_BASESHADE_FEATHER 0.0001 +#define PROP_SHADECOLOR_STEP 0 +#define PROP_1ST2ND_SHADES_FEATHER 0.0001 +#define PROP_TOONRAMP +#define PROP_LIGHTINGSHADOWMASKUV 0 +#define PROP_SHADOWOFFSET 0 +#define PROP_LIGHTINGGRADIENTSTART 0 +#define PROP_LIGHTINGGRADIENTEND 0.5 +#define PROP_SSSSCALE 1 +#define PROP_SSSBUMPBLUR 0.7 +#define PROP_SHADOWSTRENGTH 0 +#define PROP_ATTENUATIONMULTIPLIER 0 +#define PROP_LIGHTINGIGNOREAMBIENTCOLOR 0 +#define PROPM_START_LIGHTINGMODIFIERS 0 +#define PROP_LIGHTINGDIRECTCOLORMODE 0 +#define PROP_LIGHTINGINDIRECTCOLORMODE 0 +#define PROP_LIGHTINGUNCAPPED 0 +#define PROP_LIGHTINGONLYUNITYSHADOWS 0 +#define PROP_LIGHTINGMONOCHROMATIC 0 +#define PROP_LIGHTINGMINLIGHTBRIGHTNESS 0 +#define PROP_LIGHTINGMINSHADOWBRIGHTNESSRATIO 0 +#define PROPM_END_LIGHTINGMODIFIERS 0 +#define PROPM_START_DETAILSHADOWS 0 +#define PROP_LIGHTINGDETAILSHADOWSENABLED 0 +#define PROP_LIGHTINGDETAILSHADOWSUV 0 +#define PROP_LIGHTINGDETAILSTRENGTH 1 +#define PROPM_END_DETAILSHADOWS 0 +#define PROPM_START_AMBIENTOCCLUSION 0 +#define PROP_LIGHTINGENABLEAO 0 +#define PROP_LIGHTINGAOTEXUV 0 +#define PROP_AOSTRENGTH 1 +#define PROPM_END_AMBIENTOCCLUSION 0 +#define PROPM_START_LIGHTINGHSL 0 +#define PROP_LIGHTINGENABLEHSL 0 +#define PROP_LIGHTINGHSLINTENSITY 1 +#define PROP_LIGHTINGSHADOWHUE 0.5 +#define PROP_LIGHTINGSHADOWSATURATION 0.5 +#define PROP_LIGHTINGSHADOWLIGHTNESS 0.5 +#define PROPM_END_LIGHTINGHSL 0 +#define PROPM_START_LIGHTINGADVANCED 0 +#define PROP_COMMENTIFZERO_LIGHTINGADDITIVEENABLE 1 +#define PROP_LIGHTINGADDITIVETYPE 1 +#define PROP_LIGHTINGADDITIVEGRADIENTSTART 0 +#define PROP_LIGHTINGADDITIVEGRADIENTEND 0.5 +#define PROP_LIGHTINGADDITIVEPASSTHROUGH 0.5 +#define PROP_LIGHTINGADDITIVEDETAILSTRENGTH 1 +#define PROP_LIGHTINGADDITIVELIMITINTENSITY 0 +#define PROP_LIGHTINGADDITIVEMAXINTENSITY 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROPM_END_LIGHTINGADVANCED 0 +#define PROPM_END_LIGHTING 0 +#define PROPM_START_SUBSURFACE 0 +#define PROP_ENABLESSS 0 +#define PROP_SSSTHICKNESSMAPUV 0 +#define PROP_SSSTHICKNESSMOD 0 +#define PROP_SSSSCALE 0.25 +#define PROP_SSSPOWER 5 +#define PROP_SSSDISTORTION 1 +#define PROPM_END_SUBSURFACE 0 +#define PROPM_START_RIMLIGHTOPTIONS 0 +#define PROP_ENABLERIMLIGHTING 0 +#define PROP_RIMLIGHTNORMAL 1 +#define PROP_RIMLIGHTINGINVERT 0 +#define PROP_RIMWIDTH 0.8 +#define PROP_RIMSHARPNESS 0.1 +#define PROP_RIMSTRENGTH 0 +#define PROP_RIMBRIGHTEN 0 +#define PROP_RIMLIGHTCOLORBIAS 1 +#define PROP_RIMTEXUV 0 +#define PROP_RIMMASKUV 0 +#define PROPM_START_RIMHUESHIFT 0 +#define PROP_RIMHUESHIFTENABLED 0 +#define PROP_RIMHUESHIFTSPEED 0 +#define PROP_RIMHUESHIFT 0 +#define PROPM_END_RIMHUESHIFT 0 +#define PROPM_START_RIMWIDTHNOISE 0 +#define PROP_RIMWIDTHNOISETEXTUREUV 0 +#define PROP_RIMWIDTHNOISESTRENGTH 0.1 +#define PROPM_END_RIMWIDTHNOISE 0 +#define PROPM_START_SHADOWMIX 0 +#define PROP_SHADOWMIX 0 +#define PROP_SHADOWMIXTHRESHOLD 0.5 +#define PROP_SHADOWMIXWIDTHMOD 0.5 +#define PROPM_END_SHADOWMIX 0 +#define PROPM_END_RIMLIGHTOPTIONS 0 +#define PROPM_START_REFLECTIONRIM 0 +#define PROP_ENABLEENVIRONMENTALRIM 0 +#define PROP_RIMENVIROMASKUV 0 +#define PROP_RIMENVIROBLUR 0.7 +#define PROP_RIMENVIROWIDTH 0.45 +#define PROP_RIMENVIROSHARPNESS 0 +#define PROP_RIMENVIROMINBRIGHTNESS 0 +#define PROP_RIMENVIROINTENSITY 1 +#define PROPM_END_REFLECTIONRIM 0 +#define PROPM_START_BAKEDLIGHTING 0 +#define PROP_SPECULARLMOCCLUSION 0 +#define PROP_SPECLMOCCLUSIONADJUST 0.2 +#define PROP_GIEMISSIONMULTIPLIER 1 +#define PROPDSGI 0 +#define PROPLIGHTMAPFLAGS 0 +#define PROPM_END_BAKEDLIGHTING 0 +#define PROP_LOCKTOOLTIP 0 +#define PROPM_START_BRDF 0 +#define PROP_ENABLEBRDF 0 +#define PROP_BRDFMETALLICGLOSSMAPTOOLTIP 0 +#define PROP_BRDFINVERTGLOSSINESS 0 +#define PROP_BRDFMETALLICGLOSSMAPUV 0 +#define PROP_BRDFSPECULARMAPTOOLTIP 0 +#define PROP_BRDFSPECULARMAPUV 0 +#define PROP_BRDFMETALLICMAPTOOLTIP 0 +#define PROP_BRDFMETALLICMAPUV 0 +#define PROP_BRDFMETALLIC 0 +#define PROP_BRDFGLOSSINESS 0 +#define PROP_BRDFREFLECTANCE 0.5 +#define PROP_BRDFANISOTROPY 0 +#define PROP_BRDFREFLECTIONSENABLED 1 +#define PROP_BRDFSPECULARENABLED 1 +#define PROP_BRDFFALLBACK +#define PROP_BRDFFORCEFALLBACK 0 +#define PROPM_END_BRDF 0 +#define PROPM_START_METALLIC 0 +#define PROP_ENABLEMETALLIC 0 +#define PROP_CUBEMAP +#define PROP_SAMPLEWORLD 0 +#define PROP_METALLICTINTMAPUV 0 +#define PROP_METALLICMASKUV 0 +#define PROP_METALLIC 0 +#define PROP_SMOOTHNESSMASKUV 0 +#define PROP_INVERTSMOOTHNESS 0 +#define PROP_SMOOTHNESS 0 +#define PROPM_END_METALLIC 0 +#define PROPM_START_CLEARCOAT 0 +#define PROP_ENABLECLEARCOAT 0 +#define PROP_CLEARCOATHELPBOX 0 +#define PROP_CLEARCOATMAPUV 0 +#define PROP_CLEARCOATINVERTSMOOTHNESS 0 +#define PROP_CLEARCOAT 1 +#define PROP_CLEARCOATGLOSSINESS 0 +#define PROP_CLEARCOATANISOTROPY 0 +#define PROP_CLEARCOATENABLEREFLECTIONS 1 +#define PROP_CLEARCOATENABLESPECULAR 1 +#define PROP_CLEARCOATFORCEFALLBACK 0 +#define PROPM_END_CLEARCOAT 0 +#define PROPM_START_MATCAP 0 +#define PROP_MATCAPENABLE 0 +#define PROP_MATCAPBORDER 0.43 +#define PROP_MATCAPMASKUV 0 +#define PROP_MATCAPMASKINVERT 0 +#define PROP_MATCAPEMISSIONSTRENGTH 0 +#define PROP_MATCAPINTENSITY 1 +#define PROP_MATCAPLIGHTMASK 0 +#define PROP_MATCAPREPLACE 1 +#define PROP_MATCAPMULTIPLY 0 +#define PROP_MATCAPADD 0 +#define PROP_MATCAPNORMAL 1 +#define PROPM_START_MATCAPHUESHIFT 0 +#define PROP_MATCAPHUESHIFTENABLED 0 +#define PROP_MATCAPHUESHIFTSPEED 0 +#define PROP_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAP 0 +#define PROPM_START_MATCAP2 0 +#define PROP_MATCAP2ENABLE 0 +#define PROP_MATCAP2BORDER 0.43 +#define PROP_MATCAP2MASKUV 0 +#define PROP_MATCAP2MASKINVERT 0 +#define PROP_MATCAP2EMISSIONSTRENGTH 0 +#define PROP_MATCAP2INTENSITY 1 +#define PROP_MATCAP2LIGHTMASK 0 +#define PROP_MATCAP2REPLACE 0 +#define PROP_MATCAP2MULTIPLY 0 +#define PROP_MATCAP2ADD 0 +#define PROP_MATCAP2NORMAL 1 +#define PROPM_START_MATCAP2HUESHIFT 0 +#define PROP_MATCAP2HUESHIFTENABLED 0 +#define PROP_MATCAP2HUESHIFTSPEED 0 +#define PROP_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2 0 +#define PROPM_START_SPECULAR 0 +#define PROP_ENABLESPECULAR 0 +#define PROP_SPECULARTYPE 1 +#define PROP_SPECULARNORMAL 1 +#define PROP_SPECULARMETALLIC 0 +#define PROP_SPECULARMETALLICMAPUV 0 +#define PROP_SPECULARSMOOTHNESS 1 +#define PROP_SPECULARMAPUV 0 +#define PROP_SPECULARINVERTSMOOTHNESS 0 +#define PROP_SPECULARMASKUV 0 +#define PROP_SMOOTHNESSFROM 1 +#define PROP_SPECWHATTANGENT 0 +#define PROP_ANISOSPEC1ALPHA 1 +#define PROP_ANISOSPEC2ALPHA 1 +#define PROP_SPEC1OFFSET 0 +#define PROP_SPEC2SMOOTHNESS 0 +#define PROP_ANISOUSETANGENTMAP 0 +#define PROP_ANISOTANGENTMAPUV 0 +#define PROP_SPECULARTOONSTART 0.95 +#define PROP_SPECULARTOONEND 1 +#define PROP_SPECULARANISOJITTERMIRRORED 0 +#define PROP_SPECULARANISOJITTERMICROMULTIPLIER 0 +#define PROP_SPECULARANISOJITTERMICROUV 0 +#define PROP_SPECULARANISOJITTERMACROMULTIPLIER 0 +#define PROP_SPECULARANISOJITTERMACROUV 0 +#define PROPM_END_SPECULAR 0 +#define PROPM_START_SPECULAR1 0 +#define PROP_ENABLESPECULAR1 0 +#define PROP_SPECULARTYPE1 1 +#define PROP_SPECULARNORMAL1 1 +#define PROP_SPECULARMETALLIC1 0 +#define PROP_SPECULARMETALLICMAP1UV 0 +#define PROP_SPECULARSMOOTHNESS1 0.75 +#define PROP_SPECULARMAP1UV 0 +#define PROP_SPECULARINVERTSMOOTHNESS1 0 +#define PROP_SPECULARMASK1UV 0 +#define PROP_SMOOTHNESSFROM1 1 +#define PROP_SPECWHATTANGENT1 0 +#define PROP_ANISOSPEC1ALPHA1 1 +#define PROP_ANISOSPEC2ALPHA1 1 +#define PROP_SPEC1OFFSET1 0 +#define PROP_SPEC2SMOOTHNESS1 0 +#define PROP_ANISOUSETANGENTMAP1 0 +#define PROP_ANISOTANGENTMAP1UV 0 +#define PROP_SPECULARTOONSTART1 0.95 +#define PROP_SPECULARTOONEND1 1 +#define PROP_SPECULARANISOJITTERMIRRORED1 0 +#define PROP_SPECULARANISOJITTERMICROMULTIPLIER1 0 +#define PROP_SPECULARANISOJITTERMICRO1UV 0 +#define PROP_SPECULARANISOJITTERMACROMULTIPLIER1 0 +#define PROP_SPECULARANISOJITTERMACRO1UV 0 +#define PROPM_END_SPECULAR1 0 +#define PROPM_SPECIAL_EFFECTS 0 +#define PROPM_START_EMISSIONOPTIONS 0 +#define PROP_ENABLEEMISSION 0 +#define PROP_EMISSIONREPLACE 0 +#define PROP_EMISSIONBASECOLORASMAP 0 +#define PROP_EMISSIONMAPUV 0 +#define PROP_EMISSIONMASKUV 0 +#define PROP_EMISSIONSTRENGTH 0 +#define PROP_EMISSIONHUESHIFTENABLED 0 +#define PROP_EMISSIONHUESHIFT 0 +#define PROP_EMISSIONHUESHIFTSPEED 0 +#define PROPM_START_CENTEROUTEMISSION 0 +#define PROP_EMISSIONCENTEROUTENABLED 0 +#define PROP_EMISSIONCENTEROUTSPEED 5 +#define PROPM_END_CENTEROUTEMISSION 0 +#define PROPM_START_GLOWINDARKEMISSIONOPTIONS 0 +#define PROP_ENABLEGITDEMISSION 0 +#define PROP_GITDEWORLDORMESH 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER 0 +#define PROP_GITDEMINLIGHT 0 +#define PROP_GITDEMAXLIGHT 1 +#define PROPM_END_GLOWINDARKEMISSIONOPTIONS 0 +#define PROPM_START_BLINKINGEMISSIONOPTIONS 0 +#define PROP_EMISSIONBLINKINGENABLED 0 +#define PROP_EMISSIVEBLINK_MIN 0 +#define PROP_EMISSIVEBLINK_MAX 1 +#define PROP_EMISSIVEBLINK_VELOCITY 4 +#define PROP_EMISSIONBLINKINGOFFSET 0 +#define PROPM_END_BLINKINGEMISSIONOPTIONS 0 +#define PROPM_START_SCROLLINGEMISSIONOPTIONS 0 +#define PROP_SCROLLINGEMISSION 0 +#define PROP_EMISSIONSCROLLINGUSECURVE 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR 0 +#define PROP_EMISSIVESCROLL_WIDTH 10 +#define PROP_EMISSIVESCROLL_VELOCITY 10 +#define PROP_EMISSIVESCROLL_INTERVAL 20 +#define PROP_EMISSIONSCROLLINGOFFSET 0 +#define PROPM_END_SCROLLINGEMISSIONOPTIONS 0 +#define PROPM_START_EMISSIONAUDIOLINK 0 +#define PROP_ENABLEEMISSIONSTRENGTHAUDIOLINK 0 +#define PROP_AUDIOLINKEMISSIONSTRENGTHBAND 0 +#define PROP_ENABLEEMISSIONCENTEROUTAUDIOLINK 0 +#define PROP_EMISSIONCENTEROUTAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSIONCENTEROUTBAND 0 +#define PROP_EMISSIONCENTEROUTADDAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSIONCENTEROUTADDBAND 0 +#define PROP_AUDIOLINKADDEMISSIONBAND 0 +#define PROPM_END_EMISSIONAUDIOLINK 0 +#define PROPM_END_EMISSIONOPTIONS 0 +#define PROPM_START_EMISSION1OPTIONS 0 +#define PROP_ENABLEEMISSION1 0 +#define PROP_EMISSIONBASECOLORASMAP1 0 +#define PROP_EMISSIONMAP1UV 0 +#define PROP_EMISSIONMASK1UV 0 +#define PROP_EMISSIONSTRENGTH1 0 +#define PROP_EMISSIONHUESHIFTENABLED1 0 +#define PROP_EMISSIONHUESHIFT1 0 +#define PROP_EMISSIONHUESHIFTSPEED1 0 +#define PROPM_START_CENTEROUTEMISSION1 0 +#define PROP_EMISSIONCENTEROUTENABLED1 0 +#define PROP_EMISSIONCENTEROUTSPEED1 5 +#define PROPM_END_CENTEROUTEMISSION1 0 +#define PROPM_START_GLOWINDARKEMISSIONOPTIONS1 0 +#define PROP_ENABLEGITDEMISSION1 0 +#define PROP_GITDEWORLDORMESH1 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER1 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER1 0 +#define PROP_GITDEMINLIGHT1 0 +#define PROP_GITDEMAXLIGHT1 1 +#define PROPM_END_GLOWINDARKEMISSIONOPTIONS1 0 +#define PROPM_START_BLINKINGEMISSIONOPTIONS1 0 +#define PROP_EMISSIONBLINKINGENABLED1 0 +#define PROP_EMISSIVEBLINK_MIN1 0 +#define PROP_EMISSIVEBLINK_MAX1 1 +#define PROP_EMISSIVEBLINK_VELOCITY1 4 +#define PROP_EMISSIONBLINKINGOFFSET1 0 +#define PROPM_END_BLINKINGEMISSIONOPTIONS1 0 +#define PROPM_START_SCROLLINGEMISSIONOPTIONS1 0 +#define PROP_SCROLLINGEMISSION1 0 +#define PROP_EMISSIONSCROLLINGUSECURVE1 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR1 0 +#define PROP_EMISSIVESCROLL_WIDTH1 10 +#define PROP_EMISSIVESCROLL_VELOCITY1 10 +#define PROP_EMISSIVESCROLL_INTERVAL1 20 +#define PROP_EMISSIONSCROLLINGOFFSET1 0 +#define PROPM_END_SCROLLINGEMISSION1OPTIONS 0 +#define PROPM_START_EMISSION1AUDIOLINK 0 +#define PROP_ENABLEEMISSION1STRENGTHAUDIOLINK 0 +#define PROP_AUDIOLINKEMISSION1STRENGTHBAND 0 +#define PROP_ENABLEEMISSION1CENTEROUTAUDIOLINK 0 +#define PROP_EMISSION1CENTEROUTAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTBAND 0 +#define PROP_EMISSION1CENTEROUTADDAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTADDBAND 0 +#define PROP_AUDIOLINKADDEMISSION1BAND 0 +#define PROPM_END_EMISSION1AUDIOLINK 0 +#define PROPM_END_EMISSION1OPTIONS 0 +#define PROPM_START_FLIPBOOK 0 +#define PROP_ENABLEFLIPBOOK 0 +#define PROP_FLIPBOOKALPHACONTROLSFINALALPHA 0 +#define PROP_FLIPBOOKINTENSITYCONTROLSALPHA 0 +#define PROP_FLIPBOOKCOLORREPLACES 0 +#define PROP_FLIPBOOKTEXARRAYUV 0 +#define PROP_FLIPBOOKMASKUV 0 +#define PROP_FLIPBOOKTOTALFRAMES 1 +#define PROP_FLIPBOOKFPS 30 +#define PROP_FLIPBOOKTILED 0 +#define PROP_FLIPBOOKEMISSIONSTRENGTH 0 +#define PROP_FLIPBOOKROTATION 0 +#define PROP_FLIPBOOKROTATIONSPEED 0 +#define PROP_FLIPBOOKREPLACE 1 +#define PROP_FLIPBOOKMULTIPLY 0 +#define PROP_FLIPBOOKADD 0 +#define PROPM_START_FLIPBOOKAUDIOLINK 0 +#define PROP_AUDIOLINKFLIPBOOKSCALEBAND 0 +#define PROP_AUDIOLINKFLIPBOOKALPHABAND 0 +#define PROP_AUDIOLINKFLIPBOOKEMISSIONBAND 0 +#define PROP_AUDIOLINKFLIPBOOKFRAMEBAND 0 +#define PROPM_END_FLIPBOOKAUDIOLINK 0 +#define PROPM_START_MANUALFLIPBOOKCONTROL 0 +#define PROP_FLIPBOOKCURRENTFRAME -1 +#define PROPM_END_MANUALFLIPBOOKCONTROL 0 +#define PROPM_START_CROSSFADE 0 +#define PROP_FLIPBOOKCROSSFADEENABLED 0 +#define PROPM_END_CROSSFADE 0 +#define PROPM_START_FLIPBOOKHUESHIFT 0 +#define PROP_FLIPBOOKHUESHIFTENABLED 0 +#define PROP_FLIPBOOKHUESHIFTSPEED 0 +#define PROP_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOK 0 +#define PROPM_START_DISSOLVE 0 +#define PROP_ENABLEDISSOLVE 0 +#define PROP_DISSOLVETYPE 1 +#define PROP_DISSOLVEEDGEWIDTH 0.025 +#define PROP_DISSOLVEEDGEHARDNESS 0.5 +#define PROP_DISSOLVEEDGEEMISSION 0 +#define PROP_DISSOLVETOTEXTUREUV 0 +#define PROP_DISSOLVETOEMISSIONSTRENGTH 0 +#define PROP_DISSOLVENOISETEXTUREUV 0 +#define PROP_DISSOLVEINVERTNOISE 0 +#define PROP_DISSOLVEDETAILNOISEUV 0 +#define PROP_DISSOLVEINVERTDETAILNOISE 0 +#define PROP_DISSOLVEDETAILSTRENGTH 0.1 +#define PROP_DISSOLVEALPHA 0 +#define PROP_DISSOLVEUSEVERTEXCOLORS 0 +#define PROP_DISSOLVEMASKUV 0 +#define PROP_DISSOLVEMASKINVERT 0 +#define PROP_CONTINUOUSDISSOLVE 0 +#define PROPM_START_DISSOLVEMASKING 0 +#define PROP_DISSOLVEEMISSIONSIDE 2 +#define PROP_DISSOLVEEMISSION1SIDE 2 +#define PROPM_END_DISSOLVEMASKING 0 +#define PROPM_START_POINTTOPOINT 0 +#define PROP_DISSOLVEP2PWORLDLOCAL 0 +#define PROP_DISSOLVEP2PEDGELENGTH 0.1 +#define PROPM_END_POINTTOPOINT 0 +#define PROPM_START_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEHUESHIFTENABLED 0 +#define PROP_DISSOLVEHUESHIFTSPEED 0 +#define PROP_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEEDGEHUESHIFTENABLED 0 +#define PROP_DISSOLVEEDGEHUESHIFTSPEED 0 +#define PROP_DISSOLVEEDGEHUESHIFT 0 +#define PROPM_END_DISSOLVEHUESHIFT 0 +#define PROPM_START_BONUSSLIDERS 0 +#define PROP_DISSOLVEALPHA0 0 +#define PROP_DISSOLVEALPHA1 0 +#define PROP_DISSOLVEALPHA2 0 +#define PROP_DISSOLVEALPHA3 0 +#define PROP_DISSOLVEALPHA4 0 +#define PROP_DISSOLVEALPHA5 0 +#define PROP_DISSOLVEALPHA6 0 +#define PROP_DISSOLVEALPHA7 0 +#define PROP_DISSOLVEALPHA8 0 +#define PROP_DISSOLVEALPHA9 0 +#define PROPM_END_BONUSSLIDERS 0 +#define PROPM_START_DISSOLVEAUDIOLINK 0 +#define PROP_ENABLEDISSOLVEAUDIOLINK 0 +#define PROP_AUDIOLINKDISSOLVEALPHABAND 0 +#define PROP_AUDIOLINKDISSOLVEDETAILBAND 0 +#define PROPM_END_DISSOLVEAUDIOLINK 0 +#define PROPM_END_DISSOLVE 0 +#define PROPM_START_PANOSPHEREOPTIONS 0 +#define PROP_PANOTOGGLE 0 +#define PROP_PANOINFINITESTEREOTOGGLE 0 +#define PROP_PANOMASKUV 0 +#define PROP_PANOEMISSION 0 +#define PROP_PANOBLEND 0 +#define PROP_PANOCUBEMAPTOGGLE 0 +#define PROPM_END_PANOSPHEREOPTIONS 0 +#define PROPM_START_GLITTER 0 +#define PROP_GLITTERENABLE 0 +#define PROP_GLITTERMODE 0 +#define PROP_GLITTERSHAPE 0 +#define PROP_GLITTERBLENDTYPE 0 +#define PROP_GLITTERUSESURFACECOLOR 0 +#define PROP_GLITTERCOLORMAPUV 0 +#define PROP_GLITTERMASKUV 0 +#define PROP_GLITTERTEXTUREROTATION 0 +#define PROP_GLITTERFREQUENCY 300 +#define PROP_GLITTERJITTER 1 +#define PROP_GLITTERSPEED 10 +#define PROP_GLITTERSIZE 0.3 +#define PROP_GLITTERCONTRAST 300 +#define PROP_GLITTERANGLERANGE 90 +#define PROP_GLITTERMINBRIGHTNESS 0 +#define PROP_GLITTERBRIGHTNESS 3 +#define PROP_GLITTERBIAS 0.8 +#define PROP_GLITTERHIDEINSHADOW 0 +#define PROP_GLITTERCENTERSIZE 0.08 +#define PROP_GLITTERFREQUENCYLINEAREMISSIVE 20 +#define PROP_GLITTERJAGGYFIX 0 +#define PROPM_START_GLITTERHUESHIFT 0 +#define PROP_GLITTERHUESHIFTENABLED 0 +#define PROP_GLITTERHUESHIFTSPEED 0 +#define PROP_GLITTERHUESHIFT 0 +#define PROPM_END_GLITTERHUESHIFT 0 +#define PROPM_START_GLITTERRANDOM 0 +#define PROP_GLITTERRANDOMCOLORS 0 +#define PROP_GLITTERRANDOMSIZE 0 +#define PROP_GLITTERRANDOMROTATION 0 +#define PROPM_END_GLITTERRANDOM 0 +#define PROPM_END_GLITTER 0 +#define PROPM_START_TEXT 0 +#define PROP_TEXTPIXELRANGE 4 +#define PROP_TEXTENABLED 0 +#define PROPM_START_TEXTFPS 0 +#define PROP_TEXTFPSENABLED 0 +#define PROP_TEXTFPSUV 0 +#define PROP_TEXTFPSEMISSIONSTRENGTH 0 +#define PROP_TEXTFPSROTATION 0 +#define PROPM_END_TEXTFPS 0 +#define PROPM_START_TEXTPOSITION 0 +#define PROP_TEXTPOSITIONENABLED 0 +#define PROP_TEXTPOSITIONUV 0 +#define PROP_TEXTPOSITIONEMISSIONSTRENGTH 0 +#define PROP_TEXTPOSITIONROTATION 0 +#define PROPM_END_TEXTPOSITION 0 +#define PROPM_START_TEXTINSTANCETIME 0 +#define PROP_TEXTTIMEENABLED 0 +#define PROP_TEXTTIMEUV 0 +#define PROP_TEXTTIMEEMISSIONSTRENGTH 0 +#define PROP_TEXTTIMEROTATION 0 +#define PROPM_END_TEXTINSTANCETIME 0 +#define PROPM_END_TEXT 0 +#define PROPM_START_MIRROROPTIONS 0 +#define PROP_ENABLEMIRROROPTIONS 0 +#define PROP_MIRROR 0 +#define PROP_ENABLEMIRRORTEXTURE 0 +#define PROP_MIRRORTEXTUREUV 0 +#define PROPM_END_MIRROROPTIONS 0 +#define PROPM_START_DISTANCEFADE 0 +#define PROP_MAINMINALPHA 0 +#define PROP_MAINFADETEXTUREUV 0 +#define PROPM_END_DISTANCEFADE 0 +#define PROPM_START_ANGULARFADE 0 +#define PROP_ENABLERANDOM 0 +#define PROP_ANGLETYPE 0 +#define PROP_ANGLECOMPARETO 0 +#define PROP_CAMERAANGLEMIN 45 +#define PROP_CAMERAANGLEMAX 90 +#define PROP_MODELANGLEMIN 45 +#define PROP_MODELANGLEMAX 90 +#define PROP_ANGLEMINALPHA 0 +#define PROPM_END_ANGULARFADE 0 +#define PROPM_START_DISTORTIONFLOW 0 +#define PROP_ENABLEDISTORTION 0 +#define PROP_DISTORTIONMASKUV 0 +#define PROP_DISTORTIONSTRENGTH 0.5 +#define PROP_DISTORTIONSTRENGTH1 0.5 +#define PROPM_END_DISTORTIONFLOW 0 +#define PROPM_START_AUDIOLINK 0 +#define PROP_ENABLEAUDIOLINK 0 +#define PROP_AUDIOLINKHELP 0 +#define PROP_AUDIOLINKDELAY 0 +#define PROP_AUDIOLINKAVERAGING 0 +#define PROP_AUDIOLINKAVERAGERANGE 0.5 +#define PROPM_START_AUDIOLINKDEBUG 0 +#define PROP_ENABLEAUDIOLINKDEBUG 0 +#define PROP_AUDIOLINKDEBUGTREBLE 0 +#define PROP_AUDIOLINKDEBUGHIGHMID 0 +#define PROP_AUDIOLINKDEBUGLOWMID 0 +#define PROP_AUDIOLINKDEBUGBASS 0 +#define PROP_AUDIOLINKDEBUGANIMATE 0 +#define PROP_AUDIOLINKTEXTUREVISUALIZATION 0 +#define PROPM_END_AUDIOLINKDEBUG 0 +#define PROPM_END_AUDIOLINK 0 +#define PROPM_PATREON 0 +#define PROPM_START_VIDEO 0 +#define PROP_ENABLEVIDEO 0 +#define PROP_VIDEOUVNUMBER 0 +#define PROP_VIDEOTYPE 3 +#define PROP_VIDEOBACKLIGHT 1 +#define PROP_VIDEOEMISSIONENABLED 1 +#define PROPM_START_VIDEOSETTINGS 0 +#define PROP_VIDEOENABLEVIDEOPLAYER 0 +#define PROP_VIDEOPIXELATETORESOLUTION 0 +#define PROP_VIDEOREPEATVIDEOTEXTURE 0 +#define PROP_VIDEOSATURATION 0 +#define PROP_VIDEOCONTRAST 0 +#define PROPM_END_VIDEOSETTINGS 0 +#define PROPM_START_VIDEODEBUG 0 +#define PROP_VIDEOENABLEDEBUG 0 +#define PROPM_END_VIDEODEBUG 0 +#define PROPM_START_CRT 0 +#define PROP_VIDEOCRTREFRESHRATE 24 +#define PROP_VIDEOCRTPIXELENERGIZEDTIME 1.9 +#define PROPM_END_CRT 0 +#define PROPM_START_GAMEBOY 0 +#define PROPM_END_GAMEBOY 0 +#define PROPM_END_VIDEO 0 +#define PROPM_START_TOUCHOPTIONS 0 +#define PROPM_START_BULGE 0 +#define PROP_ENABLEBULGE 0 +#define PROP_BULDGEFADELENGTH 0.02 +#define PROP_BULDGEHEIGHT 0.02 +#define PROPM_END_BULGE 0 +#define PROPM_START_TOUCHGLOW 0 +#define PROP_ENABLETOUCHGLOW 0 +#define PROP_DEPTHGRADIENTTEXTUREUV 0 +#define PROP_DEPTHGRADIENTBLEND 0 +#define PROP_DEPTHGRADIENTUV 0 +#define PROP_DEPTHMASKUV 0 +#define PROP_DEPTHGLOWEMISSION 3 +#define PROP_FADELENGTH 20 +#define PROP_DEPTHALPHAMIN 1 +#define PROP_DEPTHALPHAMAX 1 +#define PROPM_END_TOUCHGLOW 0 +#define PROPM_END_TOUCHOPTIONS 0 +#define PROPM_START_HOLOGRAM 0 +#define PROP_ENABLEHOLO 0 +#define PROP_HOLOCOORDINATESPACE 0 +#define PROP_HOLOLINEDENSITY 10 +#define PROP_HOLOSCROLLSPEED 1 +#define PROPM_START_FRESNELALPHA 0 +#define PROP_HOLOFRESNELALPHA 0 +#define PROP_HOLORIMSHARPNESS 0.5 +#define PROP_HOLORIMWIDTH 0.5 +#define PROPM_END_FRESNELALPHA 0 +#define PROPM_END_HOLOGRAM 0 +#define PROPM_START_GRABPASS 0 +#define PROP_COMMENTIFZERO_ENABLEGRABPASS 0 +#define PROP_GRABPASSUSEALPHA 1 +#define PROP_GRABPASSBLENDMAPUV 0 +#define PROP_GRABPASSBLENDFACTOR 1 +#define PROP_GRABSRCBLEND 2 +#define PROP_GRABDSTBLEND 0 +#define PROPM_START_REFRACTION 0 +#define PROP_REFRACTIONENABLED 0 +#define PROP_REFRACTIONINDEX 1.333333 +#define PROP_REFRACTIONCHROMATICABERATTION 0 +#define PROPM_END_REFRACTION 0 +#define PROPM_START_BLUR 0 +#define PROP_ENABLEBLUR 0 +#define PROP_GRABBLURDISTANCE 0 +#define PROP_GRABBLURQUALITY 2 +#define PROP_GRABBLURDIRECTIONS 4 +#define PROPM_END_BLUR 0 +#define PROPM_END_GRABPASS 0 +#define PROPM_START_IRIDESCENCE 0 +#define PROP_ENABLEIRIDESCENCE 0 +#define PROP_IRIDESCENCENORMALTOGGLE 0 +#define PROP_IRIDESCENCENORMALINTENSITY 1 +#define PROP_IRIDESCENCENORMALUV 0 +#define PROP_IRIDESCENCEMASKUV 0 +#define PROP_IRIDESCENCENORMALSELECTION 1 +#define PROP_IRIDESCENCEINTENSITY 1 +#define PROP_IRIDESCENCEADDBLEND 0 +#define PROP_IRIDESCENCEREPLACEBLEND 0 +#define PROP_IRIDESCENCEMULTIPLYBLEND 0 +#define PROP_IRIDESCENCEEMISSIONSTRENGTH 0 +#define PROP_IRIDESCENCETIME 0 +#define PROPM_END_IRIDESCENCE 0 +#define PROPM_START_VERTEXGLITCH 0 +#define PROP_ENABLEVERTEXGLITCH 0 +#define PROP_VERTEXGLITCHFREQUENCY 0 +#define PROP_VERTEXGLITCHTHRESHOLD 1 +#define PROP_VERTEXGLITCHSTRENGTH 1 +#define PROPM_END_VERTEXGLITCH 0 +#define PROPM_START_SPAWNS 0 +#define PROPM_START_SCIFISPAWNIN 0 +#define PROP_ENABLESCIFISPAWNIN 0 +#define PROP_SPAWNINNOISEINTENSITY 0.35 +#define PROP_SPAWNINALPHA 0 +#define PROP_SPAWNINEMISSIONOFFSET 0.1 +#define PROP_SPAWNINVERTOFFSET 10 +#define PROP_SPAWNINVERTOFFSETOFFSET 0.1 +#define PROPM_END_SCIFISPAWNIN 0 +#define PROPM_END_SPAWNS 0 +#define PROPM_START_VORONOI 0 +#define PROP_VORONOITYPE 1 +#define PROP_VORONOISPACE 0 +#define PROP_VORONOIBLEND 0 +#define PROP_ENABLEVORONOI 0 +#define PROP_VORONOIEFFECTSMATERIALALPHA 0 +#define PROP_VORONOIMASKUV 0 +#define PROP_VORONOINOISEUV 0 +#define PROP_VORONOINOISEINTENSITY 0.1 +#define PROP_VORONOIEMISSION0 0 +#define PROP_VORONOIEMISSION1 0 +#define PROP_VORONOISCALE 5 +#define PROPM_START_VORONOIRANDOM 0 +#define PROP_VORONOIENABLERANDOMCELLCOLOR 0 +#define PROPM_END_VORONOIRANDOM 0 +#define PROPM_END_VORONOI 0 +#define PROPM_START_BLACKLIGHT 0 +#define PROP_BLACKLIGHTMASKENABLED 0 +#define PROP_BLACKLIGHTMASKDEBUG 0 +#define PROP_BLACKLIGHTMASKMETALLIC 4 +#define PROP_BLACKLIGHTMASKCLEARCOAT 4 +#define PROP_BLACKLIGHTMASKMATCAP 4 +#define PROP_BLACKLIGHTMASKMATCAP2 4 +#define PROP_BLACKLIGHTMASKEMISSION 4 +#define PROP_BLACKLIGHTMASKEMISSION2 4 +#define PROP_BLACKLIGHTMASKFLIPBOOK 4 +#define PROP_BLACKLIGHTMASKDISSOLVE 4 +#define PROP_BLACKLIGHTMASKPANOSPHERE 4 +#define PROP_BLACKLIGHTMASKGLITTER 4 +#define PROP_BLACKLIGHTMASKIRIDESCENCE 4 +#define PROPM_END_BLACKLIGHT 0 +#define PROPM_OUTLINEOPTIONS 0 +#define PROP_COMMENTIFZERO_ENABLEOUTLINEPASS 0 +#define PROP_OUTLINEMODE 0 +#define PROP_OUTLINETINTMIX 0 +#define PROP_OUTLINERIMLIGHTBLEND 0 +#define PROP_OUTLINEFIXEDSIZE 0 +#define PROP_OUTLINESMAXDISTANCE 9999 +#define PROP_OUTLINEUSEVERTEXCOLORS 0 +#define PROP_OUTLINELIT 1 +#define PROP_LINEWIDTH 0 +#define PROP_OUTLINEEMISSION 0 +#define PROP_OUTLINETEXTUREUV 0 +#define PROP_OUTLINEMASKUV 0 +#define PROP_OUTLINESHADOWSTRENGTH 1 +#define PROPM_START_OUTLINEADVANCED 0 +#define PROP_OUTLINECULL 1 +#define PROP_OUTLINEOFFSETFACTOR 0 +#define PROP_OUTLINEOFFSETUNITS 0 +#define PROPM_END_OUTLINEADVANCED 0 +#define PROPM_PARALLAXMAP 0 +#define PROP_PARALLAXMAP 0 +#define PROP_PARALLAXHEIGHTMAPENABLED 0 +#define PROP_PARALLAXINTERNALMAPENABLED 0 +#define PROPM_START_PARALLAXHEIGHTMAP 0 +#define PROP_PARALLAXUV 0 +#define PROP_PARALLAXHEIGHTMAPMASKUV 0 +#define PROP_PARALLAXSTRENGTH 0 +#define PROPM_END_PARALLAXHEIGHTMAP 0 +#define PROPM_START_PARALLAXINTERNAL 0 +#define PROP_PARALLAXINTERNALHEIGHTMAPMODE 0 +#define PROP_PARALLAXINTERNALHEIGHTFROMALPHA 0 +#define PROP_PARALLAXINTERNALMAPMASKUV 0 +#define PROP_PARALLAXINTERNALITERATIONS 1 +#define PROP_PARALLAXINTERNALMINDEPTH 0 +#define PROP_PARALLAXINTERNALMAXDEPTH 1 +#define PROP_PARALLAXINTERNALMINFADE 0 +#define PROP_PARALLAXINTERNALMAXFADE 1 +#define PROPM_END_PARALLAXINTERNAL 0 +#define PROPM_START_PARALLAXADVANCED 0 +#define PROP_PARALLAXBIAS 0.42 +#define PROPM_END_PARALLAXADVANCED 0 +#define PROPM_THIRDPARTY 1 +#define PROPM_START_RALIV 1 +#define PROP_RALIVHELP 0 +#define PROPM_START_RALIVPENETRATOR 1 +#define PROP_PENETRATORENABLED 1 +#define PROP_SQUEEZE 0.032 +#define PROP_SQUEEZEDIST 0.0259 +#define PROP_BULGEOFFSET 0.158 +#define PROP_BULGEPOWER 0.00127 +#define PROP_LENGTH 0.12 +#define PROP_ENTRANCESTIFFNESS 0.01 +#define PROP_CURVATURE 0.324 +#define PROP_RECURVATURE -0.145 +#define PROP_WRIGGLESPEED 6.2 +#define PROP_WRIGGLE 0 +#define PROP__DIRTY 1 +#define PROPM_END_RALIVPENETRATOR 0 +#define PROPM_START_RALIVORIFACE 0 +#define PROP_ORIFACEENABLED 0 +#define PROP_ENTRYOPENDURATION 0.1 +#define PROP_SHAPE1DEPTH 0.1 +#define PROP_SHAPE1DURATION 0.1 +#define PROP_SHAPE2DEPTH 0.2 +#define PROP_SHAPE2DURATION 0.1 +#define PROP_SHAPE3DEPTH 0.3 +#define PROP_SHAPE3DURATION 0.1 +#define PROP_BLENDSHAPEPOWER 1 +#define PROP_BLENDSHAPEBADSCALEFIX 1 +#define PROPM_END_RALIVORIFACE 0 +#define PROPM_START_RALIVADVANCED 0 +#define PROP_RALIVADVANCEDHELP 0 +#define PROP_ORIFICECHANNEL 0 +#define PROPM_END_RALIVADVANCED 0 +#define PROPM_END_RALIV 0 +#define PROPM_RENDERINGOPTIONS 0 +#define PROP_CULL 2 +#define PROP_ZTEST 4 +#define PROP_ZWRITE 1 +#define PROP_COLORMASK 15 +#define PROP_OFFSETFACTOR 0 +#define PROP_OFFSETUNITS 0 +#define PROP_IGNOREFOG 0 +#define PROPINSTANCING 0 +#define PROPM_START_BLENDING 0 +#define PROP_BLENDOP 0 +#define PROP_BLENDOPALPHA 0 +#define PROP_SRCBLEND 1 +#define PROP_DSTBLEND 0 +#define PROPM_END_BLENDING 0 +#define PROPM_START_STENCILPASSOPTIONS 0 +#define PROP_STENCILREF 0 +#define PROP_STENCILREADMASK 255 +#define PROP_STENCILWRITEMASK 255 +#define PROP_STENCILPASSOP 0 +#define PROP_STENCILFAILOP 0 +#define PROP_STENCILZFAILOP 0 +#define PROP_STENCILCOMPAREFUNCTION 8 +#define PROPM_END_STENCILPASSOPTIONS 0 +#define PROPM_START_OUTLINESTENCIL 0 +#define PROP_OUTLINESTENCILREF 0 +#define PROP_OUTLINESTENCILREADMASK 255 +#define PROP_OUTLINESTENCILWRITEMASK 255 +#define PROP_OUTLINESTENCILPASSOP 0 +#define PROP_OUTLINESTENCILFAILOP 0 +#define PROP_OUTLINESTENCILZFAILOP 0 +#define PROP_OUTLINESTENCILCOMPAREFUNCTION 8 +#define PROPM_END_OUTLINESTENCIL 0 +#define PROPM_START_DEBUGOPTIONS 0 +#define PROP_DEBUGENABLED 0 +#define PROP_VERTEXUNWRAP 0 +#define PROP_DEBUGMESHDATA 0 +#define PROP_DEBUGLIGHTINGDATA 0 +#define PROP_DEBUGCAMERADATA 0 +#define PROPM_END_DEBUGOPTIONS 0 + + + #pragma target 5.0 + #define FORWARD_BASE_PASS + float _Mode; + // Base Pass Features + // Decal +// #pragma shader_feature GEOM_TYPE_BRANCH +// #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL +// #pragma shader_feature GEOM_TYPE_FROND +// #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + #pragma multi_compile _ VERTEXLIGHT_ON + // patreon Base + // Black Light Mask +// #pragma shader_feature _SPECULARHIGHLIGHTS_OFF + // voronoi +// #pragma shader_feature CHROMATIC_ABERRATION + // UV Distortion +// #pragma shader_feature USER_LUT + // Vertex Offsets +// #pragma shader_feature AUTO_EXPOSURE + // Bulge +// #pragma shader_feature BLOOM_LOW + //Audio Link +// #pragma shader_feature COLOR_GRADING_LOG_VIEW + // Hologram Alpha +// #pragma shader_feature DEPTH_OF_FIELD + //Grab Pass Blur +// #pragma shader_feature CHROMATIC_ABERRATION_LOW + //Video +// #pragma shader_feature BLOOM +// #pragma shader_feature _PARALLAXMAP + // Mirror +// #pragma shader_feature _REQUIRE_UV2 + // Random +// #pragma shader_feature _SUNDISK_NONE + // Hue Shift +// #pragma shader_feature COLOR_GRADING_HDR + // Dissolve +// #pragma shader_feature DISTORT + // Panosphere +// #pragma shader_feature _DETAIL_MULX2 + // Touch Color +// #pragma shader_feature GRAIN + // Lighting +// #pragma shader_feature VIGNETTE_MASKED + // Flipbook +// #pragma shader_feature _SUNDISK_HIGH_QUALITY + // Rim Lighting +// #pragma shader_feature _GLOSSYREFLECTIONS_OFF + // Enviro Rim +// #pragma shader_feature _MAPPING_6_FRAMES_LAYOUT + // Metal +// #pragma shader_feature _METALLICGLOSSMAP + // Poi Shader Model +// #pragma shader_feature VIGNETTE_CLASSIC + // Iridescence +// #pragma shader_feature BLOOM_LENS_DIRT + // Matcap +// #pragma shader_feature _COLORADDSUBDIFF_ON + // Matcap 2 +// #pragma shader_feature COLOR_GRADING_HDR_3D + // Specular +// #pragma shader_feature _SPECGLOSSMAP + // Specular 2 +// #pragma shader_feature DITHERING + // SubSurface +// #pragma shader_feature _TERRAIN_NORMAL_MAP + // Debug +// #pragma shader_feature _COLOROVERLAY_ON + // Glitter +// #pragma shader_feature _SUNDISK_SIMPLE + // RGBMask +// #pragma shader_feature VIGNETTE + // RGB NORMALS +// #pragma shader_feature GEOM_TYPE_MESH + //Details +// #pragma shader_feature FINALPASS + // Text +// #pragma shader_feature EFFECT_BUMP + // Emission 1 +// #pragma shader_feature _EMISSION + // Emission 2 +// #pragma shader_feature EFFECT_HUE_VARIATION + // Clear Coat +// #pragma shader_feature _COLORCOLOR_ON + #pragma multi_compile_instancing + #pragma multi_compile_fwdbase + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_fog + #pragma vertex vert + #pragma fragment frag + #include "../Includes/CGI_PoiPass.cginc" + ENDCG + + } + + Pass + { + Name "ForwardAddPass" + Tags { "LightMode" = "ForwardAdd" } + + Stencil + { + Ref [_StencilRef] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + ZWrite Off + BlendOp [_BlendOp], [_BlendOpAlpha] + Blend One One + Cull [_Cull] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + CGPROGRAM +#define OPTIMIZER_ENABLED +#define VIGNETTE_MASKED +#define _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A +#define PROPSHADER_IS_USING_THRY_EDITOR 69 +#define PROPSHADER_MASTER_LABEL 0 +#define PROPSHADER_PRESETS 0 +#define PROPSHADER_PROPERTIES_LABEL_FILE 0 +#define PROPFOOTER_YOUTUBE 0 +#define PROPFOOTER_TWITTER 0 +#define PROPFOOTER_PATREON 0 +#define PROPFOOTER_DISCORD 0 +#define PROPFOOTER_GITHUB 0 +#define PROP_FORGOTTOLOCKMATERIAL 1 +#define PROP_SHADEROPTIMIZERENABLED 1 +#define PROP_LOCKTOOLTIP 0 +#define PROP_MODE 0 +#define PROPM_MAINOPTIONS 1 +#define PROP_MAINTEX +#define PROP_MAINTEXTUREUV 0 +#define PROP_MAINEMISSIONSTRENGTH 0 +#define PROP_BUMPMAPUV 0 +#define PROP_BUMPSCALE 1 +#define PROP_CLIPPINGMASKUV 0 +#define PROP_INVERSE_CLIPPING 0 +#define PROPM_START_MAINHUESHIFT 0 +#define PROP_MAINCOLORADJUSTTEXTUREUV 0 +#define PROP_MAINHUESHIFTREPLACE 0 +#define PROP_MAINHUESHIFT 0 +#define PROP_MAINHUESHIFTSPEED 0 +#define PROP_SATURATION 0 +#define PROP_MAINBRIGHTNESS 0 +#define PROP_MAINHUESHIFTTOGGLE 0 +#define PROPM_END_MAINHUESHIFT 0 +#define PROPM_START_RGBMASK 0 +#define PROP_RGBMASKENABLED 0 +#define PROP_RGBUSEVERTEXCOLORS 0 +#define PROP_RGBBLENDMULTIPLICATIVE 0 +#define PROP_RGBMASKUV 0 +#define PROP_RGBRED_UV 0 +#define PROP_RGBGREEN_UV 0 +#define PROP_RGBBLUE_UV 0 +#define PROP_RGBNORMALSENABLED 0 +#define PROP_RGBNORMALBLEND 0 +#define PROP_RGBNORMALRUV 0 +#define PROP_RGBNORMALRSCALE 0 +#define PROP_RGBNORMALGUV 0 +#define PROP_RGBNORMALGSCALE 0 +#define PROP_RGBNORMALBUV 0 +#define PROP_RGBNORMALBSCALE 0 +#define PROPM_END_RGBMASK 0 +#define PROPM_START_DETAILOPTIONS 0 +#define PROP_DETAILENABLED 0 +#define PROP_DETAILMASKUV 0 +#define PROP_DETAILTEXUV 0 +#define PROP_DETAILTEXINTENSITY 1 +#define PROP_DETAILBRIGHTNESS 1 +#define PROP_DETAILNORMALMAPSCALE 1 +#define PROP_DETAILNORMALMAPUV 0 +#define PROPM_END_DETAILOPTIONS 0 +#define PROPM_START_MAINVERTEXCOLORS 0 +#define PROP_MAINVERTEXCOLORING 0 +#define PROP_MAINUSEVERTEXCOLORALPHA 0 +#define PROPM_END_MAINVERTEXCOLORS 0 +#define PROPM_START_VERTEXMANIPULATION 0 +#define PROP_VERTEXMANIPULATIONSENABLED 0 +#define PROP_VERTEXMANIPULATIONHEIGHT 0 +#define PROP_VERTEXMANIPULATIONHEIGHTUV 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBIAS 0 +#define PROP_VERTEXROUNDINGENABLED 0 +#define PROP_VERTEXROUNDINGDIVISION 500 +#define PROPM_END_VERTEXMANIPULATION 0 +#define PROPM_START_ALPHA 0 +#define PROP_CUTOFF 0.5 +#define PROP_DITHERINGENABLED 0 +#define PROP_DITHERGRADIENT 0.1 +#define PROP_FORCEOPAQUE 0 +#define PROP_MAINSHADOWCLIPMOD 0 +#define PROP_ALPHATOMASK 0 +#define PROP_MAINALPHATOCOVERAGE 0 +#define PROP_MAINMIPSCALE 0.25 +#define PROP_ALPHAPREMULTIPLY 0 +#define PROP_ALPHAMOD 0 +#define PROPM_END_ALPHA 0 +#define PROPM_START_DECALSECTION 0 +#define PROP_DECALMASKUV 0 +#define PROPM_START_DECAL0 0 +#define PROP_DECALENABLED 0 +#define PROP_DECALEMISSIONSTRENGTH 0 +#define PROP_DECALTEXTUREUV 0 +#define PROP_DECALTILED 0 +#define PROP_DECAL0DEPTH 0 +#define PROP_DECALROTATION 0 +#define PROP_DECALROTATIONSPEED 0 +#define PROP_DECALBLENDTYPE 0 +#define PROP_DECALBLENDALPHA 1 +#define PROP_DECALHUESHIFTENABLED 0 +#define PROP_DECALHUESHIFTSPEED 0 +#define PROP_DECALHUESHIFT 0 +#define PROPM_START_DECAL0AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL0SCALEBAND 0 +#define PROP_AUDIOLINKDECAL0ALPHABAND 0 +#define PROP_AUDIOLINKDECAL0EMISSIONBAND 0 +#define PROPM_END_DECAL0AUDIOLINK 0 +#define PROPM_END_DECAL0 0 +#define PROPM_START_DECAL1 0 +#define PROP_DECALENABLED1 0 +#define PROP_DECALEMISSIONSTRENGTH1 0 +#define PROP_DECALTEXTURE1UV 0 +#define PROP_DECALTILED1 0 +#define PROP_DECAL1DEPTH 0 +#define PROP_DECALROTATION1 0 +#define PROP_DECALROTATIONSPEED1 0 +#define PROP_DECALBLENDTYPE1 0 +#define PROP_DECALBLENDALPHA1 1 +#define PROP_DECALHUESHIFTENABLED1 0 +#define PROP_DECALHUESHIFTSPEED1 0 +#define PROP_DECALHUESHIFT1 0 +#define PROPM_START_DECAL1AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL1SCALEBAND 0 +#define PROP_AUDIOLINKDECAL1ALPHABAND 0 +#define PROP_AUDIOLINKDECAL1EMISSIONBAND 0 +#define PROPM_END_DECAL1AUDIOLINK 0 +#define PROPM_END_DECAL1 0 +#define PROPM_START_DECAL2 0 +#define PROP_DECALENABLED2 0 +#define PROP_DECALEMISSIONSTRENGTH2 0 +#define PROP_DECALTEXTURE2UV 0 +#define PROP_DECALTILED2 0 +#define PROP_DECAL2DEPTH 0 +#define PROP_DECALROTATION2 0 +#define PROP_DECALROTATIONSPEED2 0 +#define PROP_DECALBLENDTYPE2 0 +#define PROP_DECALBLENDALPHA2 1 +#define PROP_DECALHUESHIFTENABLED2 0 +#define PROP_DECALHUESHIFTSPEED2 0 +#define PROP_DECALHUESHIFT2 0 +#define PROPM_START_DECAL2AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL2SCALEBAND 0 +#define PROP_AUDIOLINKDECAL2ALPHABAND 0 +#define PROP_AUDIOLINKDECAL2EMISSIONBAND 0 +#define PROPM_END_DECAL2AUDIOLINK 0 +#define PROPM_END_DECAL2 0 +#define PROPM_START_DECAL3 0 +#define PROP_DECALENABLED3 0 +#define PROP_DECALEMISSIONSTRENGTH3 0 +#define PROP_DECALTEXTURE3UV 0 +#define PROP_DECALTILED3 0 +#define PROP_DECAL3DEPTH 0 +#define PROP_DECALROTATION3 0 +#define PROP_DECALROTATIONSPEED3 0 +#define PROP_DECALBLENDTYPE3 0 +#define PROP_DECALBLENDALPHA3 1 +#define PROP_DECALHUESHIFTENABLED3 0 +#define PROP_DECALHUESHIFTSPEED3 0 +#define PROP_DECALHUESHIFT3 0 +#define PROPM_START_DECAL3AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL3SCALEBAND 0 +#define PROP_AUDIOLINKDECAL3ALPHABAND 0 +#define PROP_AUDIOLINKDECAL3EMISSIONBAND 0 +#define PROPM_END_DECAL3AUDIOLINK 0 +#define PROPM_END_DECAL3 0 +#define PROPM_END_DECALSECTION 0 +#define PROPM_START_BACKFACE 0 +#define PROP_BACKFACEENABLED 0 +#define PROP_BACKFACETEXTUREUV 0 +#define PROP_BACKFACEDETAILINTENSITY 1 +#define PROP_BACKFACEHUESHIFT 0 +#define PROP_BACKFACEEMISSIONSTRENGTH 0 +#define PROPM_END_BACKFACE 0 +#define PROPM_LIGHTINGOPTIONS 1 +#define PROPM_START_LIGHTING 1 +#define PROP_ENABLELIGHTING 1 +#define PROP_LIGHTINGMODE 4 +#define PROP_LIGHTINGSTANDARDSMOOTHNESS 0 +#define PROP_LIGHTINGWRAPPEDWRAP 0 +#define PROP_LIGHTINGWRAPPEDNORMALIZATION 0 +#define PROP_LIGHTINGRAMPTYPE 0 +#define PROP_1ST_SHADEMAPUV 0 +#define PROP_USE_1STSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_1STSHADEMAPMASK_INVERSE 0 +#define PROP_USE_BASEAS1ST 0 +#define PROP_2ND_SHADEMAPUV 0 +#define PROP_USE_2NDSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_2NDSHADEMAPMASK_INVERSE 0 +#define PROP_USE_1STAS2ND 0 +#define PROP_BASECOLOR_STEP 0.5 +#define PROP_BASESHADE_FEATHER 0.0001 +#define PROP_SHADECOLOR_STEP 0 +#define PROP_1ST2ND_SHADES_FEATHER 0.0001 +#define PROP_TOONRAMP +#define PROP_LIGHTINGSHADOWMASKUV 0 +#define PROP_SHADOWOFFSET 0 +#define PROP_LIGHTINGGRADIENTSTART 0 +#define PROP_LIGHTINGGRADIENTEND 0.5 +#define PROP_SSSSCALE 1 +#define PROP_SSSBUMPBLUR 0.7 +#define PROP_SHADOWSTRENGTH 0 +#define PROP_ATTENUATIONMULTIPLIER 0 +#define PROP_LIGHTINGIGNOREAMBIENTCOLOR 0 +#define PROPM_START_LIGHTINGMODIFIERS 0 +#define PROP_LIGHTINGDIRECTCOLORMODE 0 +#define PROP_LIGHTINGINDIRECTCOLORMODE 0 +#define PROP_LIGHTINGUNCAPPED 0 +#define PROP_LIGHTINGONLYUNITYSHADOWS 0 +#define PROP_LIGHTINGMONOCHROMATIC 0 +#define PROP_LIGHTINGMINLIGHTBRIGHTNESS 0 +#define PROP_LIGHTINGMINSHADOWBRIGHTNESSRATIO 0 +#define PROPM_END_LIGHTINGMODIFIERS 0 +#define PROPM_START_DETAILSHADOWS 0 +#define PROP_LIGHTINGDETAILSHADOWSENABLED 0 +#define PROP_LIGHTINGDETAILSHADOWSUV 0 +#define PROP_LIGHTINGDETAILSTRENGTH 1 +#define PROPM_END_DETAILSHADOWS 0 +#define PROPM_START_AMBIENTOCCLUSION 0 +#define PROP_LIGHTINGENABLEAO 0 +#define PROP_LIGHTINGAOTEXUV 0 +#define PROP_AOSTRENGTH 1 +#define PROPM_END_AMBIENTOCCLUSION 0 +#define PROPM_START_LIGHTINGHSL 0 +#define PROP_LIGHTINGENABLEHSL 0 +#define PROP_LIGHTINGHSLINTENSITY 1 +#define PROP_LIGHTINGSHADOWHUE 0.5 +#define PROP_LIGHTINGSHADOWSATURATION 0.5 +#define PROP_LIGHTINGSHADOWLIGHTNESS 0.5 +#define PROPM_END_LIGHTINGHSL 0 +#define PROPM_START_LIGHTINGADVANCED 0 +#define PROP_COMMENTIFZERO_LIGHTINGADDITIVEENABLE 1 +#define PROP_LIGHTINGADDITIVETYPE 1 +#define PROP_LIGHTINGADDITIVEGRADIENTSTART 0 +#define PROP_LIGHTINGADDITIVEGRADIENTEND 0.5 +#define PROP_LIGHTINGADDITIVEPASSTHROUGH 0.5 +#define PROP_LIGHTINGADDITIVEDETAILSTRENGTH 1 +#define PROP_LIGHTINGADDITIVELIMITINTENSITY 0 +#define PROP_LIGHTINGADDITIVEMAXINTENSITY 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROPM_END_LIGHTINGADVANCED 0 +#define PROPM_END_LIGHTING 0 +#define PROPM_START_SUBSURFACE 0 +#define PROP_ENABLESSS 0 +#define PROP_SSSTHICKNESSMAPUV 0 +#define PROP_SSSTHICKNESSMOD 0 +#define PROP_SSSSCALE 0.25 +#define PROP_SSSPOWER 5 +#define PROP_SSSDISTORTION 1 +#define PROPM_END_SUBSURFACE 0 +#define PROPM_START_RIMLIGHTOPTIONS 0 +#define PROP_ENABLERIMLIGHTING 0 +#define PROP_RIMLIGHTNORMAL 1 +#define PROP_RIMLIGHTINGINVERT 0 +#define PROP_RIMWIDTH 0.8 +#define PROP_RIMSHARPNESS 0.1 +#define PROP_RIMSTRENGTH 0 +#define PROP_RIMBRIGHTEN 0 +#define PROP_RIMLIGHTCOLORBIAS 1 +#define PROP_RIMTEXUV 0 +#define PROP_RIMMASKUV 0 +#define PROPM_START_RIMHUESHIFT 0 +#define PROP_RIMHUESHIFTENABLED 0 +#define PROP_RIMHUESHIFTSPEED 0 +#define PROP_RIMHUESHIFT 0 +#define PROPM_END_RIMHUESHIFT 0 +#define PROPM_START_RIMWIDTHNOISE 0 +#define PROP_RIMWIDTHNOISETEXTUREUV 0 +#define PROP_RIMWIDTHNOISESTRENGTH 0.1 +#define PROPM_END_RIMWIDTHNOISE 0 +#define PROPM_START_SHADOWMIX 0 +#define PROP_SHADOWMIX 0 +#define PROP_SHADOWMIXTHRESHOLD 0.5 +#define PROP_SHADOWMIXWIDTHMOD 0.5 +#define PROPM_END_SHADOWMIX 0 +#define PROPM_END_RIMLIGHTOPTIONS 0 +#define PROPM_START_REFLECTIONRIM 0 +#define PROP_ENABLEENVIRONMENTALRIM 0 +#define PROP_RIMENVIROMASKUV 0 +#define PROP_RIMENVIROBLUR 0.7 +#define PROP_RIMENVIROWIDTH 0.45 +#define PROP_RIMENVIROSHARPNESS 0 +#define PROP_RIMENVIROMINBRIGHTNESS 0 +#define PROP_RIMENVIROINTENSITY 1 +#define PROPM_END_REFLECTIONRIM 0 +#define PROPM_START_BAKEDLIGHTING 0 +#define PROP_SPECULARLMOCCLUSION 0 +#define PROP_SPECLMOCCLUSIONADJUST 0.2 +#define PROP_GIEMISSIONMULTIPLIER 1 +#define PROPDSGI 0 +#define PROPLIGHTMAPFLAGS 0 +#define PROPM_END_BAKEDLIGHTING 0 +#define PROP_LOCKTOOLTIP 0 +#define PROPM_START_BRDF 0 +#define PROP_ENABLEBRDF 0 +#define PROP_BRDFMETALLICGLOSSMAPTOOLTIP 0 +#define PROP_BRDFINVERTGLOSSINESS 0 +#define PROP_BRDFMETALLICGLOSSMAPUV 0 +#define PROP_BRDFSPECULARMAPTOOLTIP 0 +#define PROP_BRDFSPECULARMAPUV 0 +#define PROP_BRDFMETALLICMAPTOOLTIP 0 +#define PROP_BRDFMETALLICMAPUV 0 +#define PROP_BRDFMETALLIC 0 +#define PROP_BRDFGLOSSINESS 0 +#define PROP_BRDFREFLECTANCE 0.5 +#define PROP_BRDFANISOTROPY 0 +#define PROP_BRDFREFLECTIONSENABLED 1 +#define PROP_BRDFSPECULARENABLED 1 +#define PROP_BRDFFALLBACK +#define PROP_BRDFFORCEFALLBACK 0 +#define PROPM_END_BRDF 0 +#define PROPM_START_METALLIC 0 +#define PROP_ENABLEMETALLIC 0 +#define PROP_CUBEMAP +#define PROP_SAMPLEWORLD 0 +#define PROP_METALLICTINTMAPUV 0 +#define PROP_METALLICMASKUV 0 +#define PROP_METALLIC 0 +#define PROP_SMOOTHNESSMASKUV 0 +#define PROP_INVERTSMOOTHNESS 0 +#define PROP_SMOOTHNESS 0 +#define PROPM_END_METALLIC 0 +#define PROPM_START_CLEARCOAT 0 +#define PROP_ENABLECLEARCOAT 0 +#define PROP_CLEARCOATHELPBOX 0 +#define PROP_CLEARCOATMAPUV 0 +#define PROP_CLEARCOATINVERTSMOOTHNESS 0 +#define PROP_CLEARCOAT 1 +#define PROP_CLEARCOATGLOSSINESS 0 +#define PROP_CLEARCOATANISOTROPY 0 +#define PROP_CLEARCOATENABLEREFLECTIONS 1 +#define PROP_CLEARCOATENABLESPECULAR 1 +#define PROP_CLEARCOATFORCEFALLBACK 0 +#define PROPM_END_CLEARCOAT 0 +#define PROPM_START_MATCAP 0 +#define PROP_MATCAPENABLE 0 +#define PROP_MATCAPBORDER 0.43 +#define PROP_MATCAPMASKUV 0 +#define PROP_MATCAPMASKINVERT 0 +#define PROP_MATCAPEMISSIONSTRENGTH 0 +#define PROP_MATCAPINTENSITY 1 +#define PROP_MATCAPLIGHTMASK 0 +#define PROP_MATCAPREPLACE 1 +#define PROP_MATCAPMULTIPLY 0 +#define PROP_MATCAPADD 0 +#define PROP_MATCAPNORMAL 1 +#define PROPM_START_MATCAPHUESHIFT 0 +#define PROP_MATCAPHUESHIFTENABLED 0 +#define PROP_MATCAPHUESHIFTSPEED 0 +#define PROP_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAP 0 +#define PROPM_START_MATCAP2 0 +#define PROP_MATCAP2ENABLE 0 +#define PROP_MATCAP2BORDER 0.43 +#define PROP_MATCAP2MASKUV 0 +#define PROP_MATCAP2MASKINVERT 0 +#define PROP_MATCAP2EMISSIONSTRENGTH 0 +#define PROP_MATCAP2INTENSITY 1 +#define PROP_MATCAP2LIGHTMASK 0 +#define PROP_MATCAP2REPLACE 0 +#define PROP_MATCAP2MULTIPLY 0 +#define PROP_MATCAP2ADD 0 +#define PROP_MATCAP2NORMAL 1 +#define PROPM_START_MATCAP2HUESHIFT 0 +#define PROP_MATCAP2HUESHIFTENABLED 0 +#define PROP_MATCAP2HUESHIFTSPEED 0 +#define PROP_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2 0 +#define PROPM_START_SPECULAR 0 +#define PROP_ENABLESPECULAR 0 +#define PROP_SPECULARTYPE 1 +#define PROP_SPECULARNORMAL 1 +#define PROP_SPECULARMETALLIC 0 +#define PROP_SPECULARMETALLICMAPUV 0 +#define PROP_SPECULARSMOOTHNESS 1 +#define PROP_SPECULARMAPUV 0 +#define PROP_SPECULARINVERTSMOOTHNESS 0 +#define PROP_SPECULARMASKUV 0 +#define PROP_SMOOTHNESSFROM 1 +#define PROP_SPECWHATTANGENT 0 +#define PROP_ANISOSPEC1ALPHA 1 +#define PROP_ANISOSPEC2ALPHA 1 +#define PROP_SPEC1OFFSET 0 +#define PROP_SPEC2SMOOTHNESS 0 +#define PROP_ANISOUSETANGENTMAP 0 +#define PROP_ANISOTANGENTMAPUV 0 +#define PROP_SPECULARTOONSTART 0.95 +#define PROP_SPECULARTOONEND 1 +#define PROP_SPECULARANISOJITTERMIRRORED 0 +#define PROP_SPECULARANISOJITTERMICROMULTIPLIER 0 +#define PROP_SPECULARANISOJITTERMICROUV 0 +#define PROP_SPECULARANISOJITTERMACROMULTIPLIER 0 +#define PROP_SPECULARANISOJITTERMACROUV 0 +#define PROPM_END_SPECULAR 0 +#define PROPM_START_SPECULAR1 0 +#define PROP_ENABLESPECULAR1 0 +#define PROP_SPECULARTYPE1 1 +#define PROP_SPECULARNORMAL1 1 +#define PROP_SPECULARMETALLIC1 0 +#define PROP_SPECULARMETALLICMAP1UV 0 +#define PROP_SPECULARSMOOTHNESS1 0.75 +#define PROP_SPECULARMAP1UV 0 +#define PROP_SPECULARINVERTSMOOTHNESS1 0 +#define PROP_SPECULARMASK1UV 0 +#define PROP_SMOOTHNESSFROM1 1 +#define PROP_SPECWHATTANGENT1 0 +#define PROP_ANISOSPEC1ALPHA1 1 +#define PROP_ANISOSPEC2ALPHA1 1 +#define PROP_SPEC1OFFSET1 0 +#define PROP_SPEC2SMOOTHNESS1 0 +#define PROP_ANISOUSETANGENTMAP1 0 +#define PROP_ANISOTANGENTMAP1UV 0 +#define PROP_SPECULARTOONSTART1 0.95 +#define PROP_SPECULARTOONEND1 1 +#define PROP_SPECULARANISOJITTERMIRRORED1 0 +#define PROP_SPECULARANISOJITTERMICROMULTIPLIER1 0 +#define PROP_SPECULARANISOJITTERMICRO1UV 0 +#define PROP_SPECULARANISOJITTERMACROMULTIPLIER1 0 +#define PROP_SPECULARANISOJITTERMACRO1UV 0 +#define PROPM_END_SPECULAR1 0 +#define PROPM_SPECIAL_EFFECTS 0 +#define PROPM_START_EMISSIONOPTIONS 0 +#define PROP_ENABLEEMISSION 0 +#define PROP_EMISSIONREPLACE 0 +#define PROP_EMISSIONBASECOLORASMAP 0 +#define PROP_EMISSIONMAPUV 0 +#define PROP_EMISSIONMASKUV 0 +#define PROP_EMISSIONSTRENGTH 0 +#define PROP_EMISSIONHUESHIFTENABLED 0 +#define PROP_EMISSIONHUESHIFT 0 +#define PROP_EMISSIONHUESHIFTSPEED 0 +#define PROPM_START_CENTEROUTEMISSION 0 +#define PROP_EMISSIONCENTEROUTENABLED 0 +#define PROP_EMISSIONCENTEROUTSPEED 5 +#define PROPM_END_CENTEROUTEMISSION 0 +#define PROPM_START_GLOWINDARKEMISSIONOPTIONS 0 +#define PROP_ENABLEGITDEMISSION 0 +#define PROP_GITDEWORLDORMESH 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER 0 +#define PROP_GITDEMINLIGHT 0 +#define PROP_GITDEMAXLIGHT 1 +#define PROPM_END_GLOWINDARKEMISSIONOPTIONS 0 +#define PROPM_START_BLINKINGEMISSIONOPTIONS 0 +#define PROP_EMISSIONBLINKINGENABLED 0 +#define PROP_EMISSIVEBLINK_MIN 0 +#define PROP_EMISSIVEBLINK_MAX 1 +#define PROP_EMISSIVEBLINK_VELOCITY 4 +#define PROP_EMISSIONBLINKINGOFFSET 0 +#define PROPM_END_BLINKINGEMISSIONOPTIONS 0 +#define PROPM_START_SCROLLINGEMISSIONOPTIONS 0 +#define PROP_SCROLLINGEMISSION 0 +#define PROP_EMISSIONSCROLLINGUSECURVE 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR 0 +#define PROP_EMISSIVESCROLL_WIDTH 10 +#define PROP_EMISSIVESCROLL_VELOCITY 10 +#define PROP_EMISSIVESCROLL_INTERVAL 20 +#define PROP_EMISSIONSCROLLINGOFFSET 0 +#define PROPM_END_SCROLLINGEMISSIONOPTIONS 0 +#define PROPM_START_EMISSIONAUDIOLINK 0 +#define PROP_ENABLEEMISSIONSTRENGTHAUDIOLINK 0 +#define PROP_AUDIOLINKEMISSIONSTRENGTHBAND 0 +#define PROP_ENABLEEMISSIONCENTEROUTAUDIOLINK 0 +#define PROP_EMISSIONCENTEROUTAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSIONCENTEROUTBAND 0 +#define PROP_EMISSIONCENTEROUTADDAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSIONCENTEROUTADDBAND 0 +#define PROP_AUDIOLINKADDEMISSIONBAND 0 +#define PROPM_END_EMISSIONAUDIOLINK 0 +#define PROPM_END_EMISSIONOPTIONS 0 +#define PROPM_START_EMISSION1OPTIONS 0 +#define PROP_ENABLEEMISSION1 0 +#define PROP_EMISSIONBASECOLORASMAP1 0 +#define PROP_EMISSIONMAP1UV 0 +#define PROP_EMISSIONMASK1UV 0 +#define PROP_EMISSIONSTRENGTH1 0 +#define PROP_EMISSIONHUESHIFTENABLED1 0 +#define PROP_EMISSIONHUESHIFT1 0 +#define PROP_EMISSIONHUESHIFTSPEED1 0 +#define PROPM_START_CENTEROUTEMISSION1 0 +#define PROP_EMISSIONCENTEROUTENABLED1 0 +#define PROP_EMISSIONCENTEROUTSPEED1 5 +#define PROPM_END_CENTEROUTEMISSION1 0 +#define PROPM_START_GLOWINDARKEMISSIONOPTIONS1 0 +#define PROP_ENABLEGITDEMISSION1 0 +#define PROP_GITDEWORLDORMESH1 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER1 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER1 0 +#define PROP_GITDEMINLIGHT1 0 +#define PROP_GITDEMAXLIGHT1 1 +#define PROPM_END_GLOWINDARKEMISSIONOPTIONS1 0 +#define PROPM_START_BLINKINGEMISSIONOPTIONS1 0 +#define PROP_EMISSIONBLINKINGENABLED1 0 +#define PROP_EMISSIVEBLINK_MIN1 0 +#define PROP_EMISSIVEBLINK_MAX1 1 +#define PROP_EMISSIVEBLINK_VELOCITY1 4 +#define PROP_EMISSIONBLINKINGOFFSET1 0 +#define PROPM_END_BLINKINGEMISSIONOPTIONS1 0 +#define PROPM_START_SCROLLINGEMISSIONOPTIONS1 0 +#define PROP_SCROLLINGEMISSION1 0 +#define PROP_EMISSIONSCROLLINGUSECURVE1 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR1 0 +#define PROP_EMISSIVESCROLL_WIDTH1 10 +#define PROP_EMISSIVESCROLL_VELOCITY1 10 +#define PROP_EMISSIVESCROLL_INTERVAL1 20 +#define PROP_EMISSIONSCROLLINGOFFSET1 0 +#define PROPM_END_SCROLLINGEMISSION1OPTIONS 0 +#define PROPM_START_EMISSION1AUDIOLINK 0 +#define PROP_ENABLEEMISSION1STRENGTHAUDIOLINK 0 +#define PROP_AUDIOLINKEMISSION1STRENGTHBAND 0 +#define PROP_ENABLEEMISSION1CENTEROUTAUDIOLINK 0 +#define PROP_EMISSION1CENTEROUTAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTBAND 0 +#define PROP_EMISSION1CENTEROUTADDAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTADDBAND 0 +#define PROP_AUDIOLINKADDEMISSION1BAND 0 +#define PROPM_END_EMISSION1AUDIOLINK 0 +#define PROPM_END_EMISSION1OPTIONS 0 +#define PROPM_START_FLIPBOOK 0 +#define PROP_ENABLEFLIPBOOK 0 +#define PROP_FLIPBOOKALPHACONTROLSFINALALPHA 0 +#define PROP_FLIPBOOKINTENSITYCONTROLSALPHA 0 +#define PROP_FLIPBOOKCOLORREPLACES 0 +#define PROP_FLIPBOOKTEXARRAYUV 0 +#define PROP_FLIPBOOKMASKUV 0 +#define PROP_FLIPBOOKTOTALFRAMES 1 +#define PROP_FLIPBOOKFPS 30 +#define PROP_FLIPBOOKTILED 0 +#define PROP_FLIPBOOKEMISSIONSTRENGTH 0 +#define PROP_FLIPBOOKROTATION 0 +#define PROP_FLIPBOOKROTATIONSPEED 0 +#define PROP_FLIPBOOKREPLACE 1 +#define PROP_FLIPBOOKMULTIPLY 0 +#define PROP_FLIPBOOKADD 0 +#define PROPM_START_FLIPBOOKAUDIOLINK 0 +#define PROP_AUDIOLINKFLIPBOOKSCALEBAND 0 +#define PROP_AUDIOLINKFLIPBOOKALPHABAND 0 +#define PROP_AUDIOLINKFLIPBOOKEMISSIONBAND 0 +#define PROP_AUDIOLINKFLIPBOOKFRAMEBAND 0 +#define PROPM_END_FLIPBOOKAUDIOLINK 0 +#define PROPM_START_MANUALFLIPBOOKCONTROL 0 +#define PROP_FLIPBOOKCURRENTFRAME -1 +#define PROPM_END_MANUALFLIPBOOKCONTROL 0 +#define PROPM_START_CROSSFADE 0 +#define PROP_FLIPBOOKCROSSFADEENABLED 0 +#define PROPM_END_CROSSFADE 0 +#define PROPM_START_FLIPBOOKHUESHIFT 0 +#define PROP_FLIPBOOKHUESHIFTENABLED 0 +#define PROP_FLIPBOOKHUESHIFTSPEED 0 +#define PROP_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOK 0 +#define PROPM_START_DISSOLVE 0 +#define PROP_ENABLEDISSOLVE 0 +#define PROP_DISSOLVETYPE 1 +#define PROP_DISSOLVEEDGEWIDTH 0.025 +#define PROP_DISSOLVEEDGEHARDNESS 0.5 +#define PROP_DISSOLVEEDGEEMISSION 0 +#define PROP_DISSOLVETOTEXTUREUV 0 +#define PROP_DISSOLVETOEMISSIONSTRENGTH 0 +#define PROP_DISSOLVENOISETEXTUREUV 0 +#define PROP_DISSOLVEINVERTNOISE 0 +#define PROP_DISSOLVEDETAILNOISEUV 0 +#define PROP_DISSOLVEINVERTDETAILNOISE 0 +#define PROP_DISSOLVEDETAILSTRENGTH 0.1 +#define PROP_DISSOLVEALPHA 0 +#define PROP_DISSOLVEUSEVERTEXCOLORS 0 +#define PROP_DISSOLVEMASKUV 0 +#define PROP_DISSOLVEMASKINVERT 0 +#define PROP_CONTINUOUSDISSOLVE 0 +#define PROPM_START_DISSOLVEMASKING 0 +#define PROP_DISSOLVEEMISSIONSIDE 2 +#define PROP_DISSOLVEEMISSION1SIDE 2 +#define PROPM_END_DISSOLVEMASKING 0 +#define PROPM_START_POINTTOPOINT 0 +#define PROP_DISSOLVEP2PWORLDLOCAL 0 +#define PROP_DISSOLVEP2PEDGELENGTH 0.1 +#define PROPM_END_POINTTOPOINT 0 +#define PROPM_START_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEHUESHIFTENABLED 0 +#define PROP_DISSOLVEHUESHIFTSPEED 0 +#define PROP_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEEDGEHUESHIFTENABLED 0 +#define PROP_DISSOLVEEDGEHUESHIFTSPEED 0 +#define PROP_DISSOLVEEDGEHUESHIFT 0 +#define PROPM_END_DISSOLVEHUESHIFT 0 +#define PROPM_START_BONUSSLIDERS 0 +#define PROP_DISSOLVEALPHA0 0 +#define PROP_DISSOLVEALPHA1 0 +#define PROP_DISSOLVEALPHA2 0 +#define PROP_DISSOLVEALPHA3 0 +#define PROP_DISSOLVEALPHA4 0 +#define PROP_DISSOLVEALPHA5 0 +#define PROP_DISSOLVEALPHA6 0 +#define PROP_DISSOLVEALPHA7 0 +#define PROP_DISSOLVEALPHA8 0 +#define PROP_DISSOLVEALPHA9 0 +#define PROPM_END_BONUSSLIDERS 0 +#define PROPM_START_DISSOLVEAUDIOLINK 0 +#define PROP_ENABLEDISSOLVEAUDIOLINK 0 +#define PROP_AUDIOLINKDISSOLVEALPHABAND 0 +#define PROP_AUDIOLINKDISSOLVEDETAILBAND 0 +#define PROPM_END_DISSOLVEAUDIOLINK 0 +#define PROPM_END_DISSOLVE 0 +#define PROPM_START_PANOSPHEREOPTIONS 0 +#define PROP_PANOTOGGLE 0 +#define PROP_PANOINFINITESTEREOTOGGLE 0 +#define PROP_PANOMASKUV 0 +#define PROP_PANOEMISSION 0 +#define PROP_PANOBLEND 0 +#define PROP_PANOCUBEMAPTOGGLE 0 +#define PROPM_END_PANOSPHEREOPTIONS 0 +#define PROPM_START_GLITTER 0 +#define PROP_GLITTERENABLE 0 +#define PROP_GLITTERMODE 0 +#define PROP_GLITTERSHAPE 0 +#define PROP_GLITTERBLENDTYPE 0 +#define PROP_GLITTERUSESURFACECOLOR 0 +#define PROP_GLITTERCOLORMAPUV 0 +#define PROP_GLITTERMASKUV 0 +#define PROP_GLITTERTEXTUREROTATION 0 +#define PROP_GLITTERFREQUENCY 300 +#define PROP_GLITTERJITTER 1 +#define PROP_GLITTERSPEED 10 +#define PROP_GLITTERSIZE 0.3 +#define PROP_GLITTERCONTRAST 300 +#define PROP_GLITTERANGLERANGE 90 +#define PROP_GLITTERMINBRIGHTNESS 0 +#define PROP_GLITTERBRIGHTNESS 3 +#define PROP_GLITTERBIAS 0.8 +#define PROP_GLITTERHIDEINSHADOW 0 +#define PROP_GLITTERCENTERSIZE 0.08 +#define PROP_GLITTERFREQUENCYLINEAREMISSIVE 20 +#define PROP_GLITTERJAGGYFIX 0 +#define PROPM_START_GLITTERHUESHIFT 0 +#define PROP_GLITTERHUESHIFTENABLED 0 +#define PROP_GLITTERHUESHIFTSPEED 0 +#define PROP_GLITTERHUESHIFT 0 +#define PROPM_END_GLITTERHUESHIFT 0 +#define PROPM_START_GLITTERRANDOM 0 +#define PROP_GLITTERRANDOMCOLORS 0 +#define PROP_GLITTERRANDOMSIZE 0 +#define PROP_GLITTERRANDOMROTATION 0 +#define PROPM_END_GLITTERRANDOM 0 +#define PROPM_END_GLITTER 0 +#define PROPM_START_TEXT 0 +#define PROP_TEXTPIXELRANGE 4 +#define PROP_TEXTENABLED 0 +#define PROPM_START_TEXTFPS 0 +#define PROP_TEXTFPSENABLED 0 +#define PROP_TEXTFPSUV 0 +#define PROP_TEXTFPSEMISSIONSTRENGTH 0 +#define PROP_TEXTFPSROTATION 0 +#define PROPM_END_TEXTFPS 0 +#define PROPM_START_TEXTPOSITION 0 +#define PROP_TEXTPOSITIONENABLED 0 +#define PROP_TEXTPOSITIONUV 0 +#define PROP_TEXTPOSITIONEMISSIONSTRENGTH 0 +#define PROP_TEXTPOSITIONROTATION 0 +#define PROPM_END_TEXTPOSITION 0 +#define PROPM_START_TEXTINSTANCETIME 0 +#define PROP_TEXTTIMEENABLED 0 +#define PROP_TEXTTIMEUV 0 +#define PROP_TEXTTIMEEMISSIONSTRENGTH 0 +#define PROP_TEXTTIMEROTATION 0 +#define PROPM_END_TEXTINSTANCETIME 0 +#define PROPM_END_TEXT 0 +#define PROPM_START_MIRROROPTIONS 0 +#define PROP_ENABLEMIRROROPTIONS 0 +#define PROP_MIRROR 0 +#define PROP_ENABLEMIRRORTEXTURE 0 +#define PROP_MIRRORTEXTUREUV 0 +#define PROPM_END_MIRROROPTIONS 0 +#define PROPM_START_DISTANCEFADE 0 +#define PROP_MAINMINALPHA 0 +#define PROP_MAINFADETEXTUREUV 0 +#define PROPM_END_DISTANCEFADE 0 +#define PROPM_START_ANGULARFADE 0 +#define PROP_ENABLERANDOM 0 +#define PROP_ANGLETYPE 0 +#define PROP_ANGLECOMPARETO 0 +#define PROP_CAMERAANGLEMIN 45 +#define PROP_CAMERAANGLEMAX 90 +#define PROP_MODELANGLEMIN 45 +#define PROP_MODELANGLEMAX 90 +#define PROP_ANGLEMINALPHA 0 +#define PROPM_END_ANGULARFADE 0 +#define PROPM_START_DISTORTIONFLOW 0 +#define PROP_ENABLEDISTORTION 0 +#define PROP_DISTORTIONMASKUV 0 +#define PROP_DISTORTIONSTRENGTH 0.5 +#define PROP_DISTORTIONSTRENGTH1 0.5 +#define PROPM_END_DISTORTIONFLOW 0 +#define PROPM_START_AUDIOLINK 0 +#define PROP_ENABLEAUDIOLINK 0 +#define PROP_AUDIOLINKHELP 0 +#define PROP_AUDIOLINKDELAY 0 +#define PROP_AUDIOLINKAVERAGING 0 +#define PROP_AUDIOLINKAVERAGERANGE 0.5 +#define PROPM_START_AUDIOLINKDEBUG 0 +#define PROP_ENABLEAUDIOLINKDEBUG 0 +#define PROP_AUDIOLINKDEBUGTREBLE 0 +#define PROP_AUDIOLINKDEBUGHIGHMID 0 +#define PROP_AUDIOLINKDEBUGLOWMID 0 +#define PROP_AUDIOLINKDEBUGBASS 0 +#define PROP_AUDIOLINKDEBUGANIMATE 0 +#define PROP_AUDIOLINKTEXTUREVISUALIZATION 0 +#define PROPM_END_AUDIOLINKDEBUG 0 +#define PROPM_END_AUDIOLINK 0 +#define PROPM_PATREON 0 +#define PROPM_START_VIDEO 0 +#define PROP_ENABLEVIDEO 0 +#define PROP_VIDEOUVNUMBER 0 +#define PROP_VIDEOTYPE 3 +#define PROP_VIDEOBACKLIGHT 1 +#define PROP_VIDEOEMISSIONENABLED 1 +#define PROPM_START_VIDEOSETTINGS 0 +#define PROP_VIDEOENABLEVIDEOPLAYER 0 +#define PROP_VIDEOPIXELATETORESOLUTION 0 +#define PROP_VIDEOREPEATVIDEOTEXTURE 0 +#define PROP_VIDEOSATURATION 0 +#define PROP_VIDEOCONTRAST 0 +#define PROPM_END_VIDEOSETTINGS 0 +#define PROPM_START_VIDEODEBUG 0 +#define PROP_VIDEOENABLEDEBUG 0 +#define PROPM_END_VIDEODEBUG 0 +#define PROPM_START_CRT 0 +#define PROP_VIDEOCRTREFRESHRATE 24 +#define PROP_VIDEOCRTPIXELENERGIZEDTIME 1.9 +#define PROPM_END_CRT 0 +#define PROPM_START_GAMEBOY 0 +#define PROPM_END_GAMEBOY 0 +#define PROPM_END_VIDEO 0 +#define PROPM_START_TOUCHOPTIONS 0 +#define PROPM_START_BULGE 0 +#define PROP_ENABLEBULGE 0 +#define PROP_BULDGEFADELENGTH 0.02 +#define PROP_BULDGEHEIGHT 0.02 +#define PROPM_END_BULGE 0 +#define PROPM_START_TOUCHGLOW 0 +#define PROP_ENABLETOUCHGLOW 0 +#define PROP_DEPTHGRADIENTTEXTUREUV 0 +#define PROP_DEPTHGRADIENTBLEND 0 +#define PROP_DEPTHGRADIENTUV 0 +#define PROP_DEPTHMASKUV 0 +#define PROP_DEPTHGLOWEMISSION 3 +#define PROP_FADELENGTH 20 +#define PROP_DEPTHALPHAMIN 1 +#define PROP_DEPTHALPHAMAX 1 +#define PROPM_END_TOUCHGLOW 0 +#define PROPM_END_TOUCHOPTIONS 0 +#define PROPM_START_HOLOGRAM 0 +#define PROP_ENABLEHOLO 0 +#define PROP_HOLOCOORDINATESPACE 0 +#define PROP_HOLOLINEDENSITY 10 +#define PROP_HOLOSCROLLSPEED 1 +#define PROPM_START_FRESNELALPHA 0 +#define PROP_HOLOFRESNELALPHA 0 +#define PROP_HOLORIMSHARPNESS 0.5 +#define PROP_HOLORIMWIDTH 0.5 +#define PROPM_END_FRESNELALPHA 0 +#define PROPM_END_HOLOGRAM 0 +#define PROPM_START_GRABPASS 0 +#define PROP_COMMENTIFZERO_ENABLEGRABPASS 0 +#define PROP_GRABPASSUSEALPHA 1 +#define PROP_GRABPASSBLENDMAPUV 0 +#define PROP_GRABPASSBLENDFACTOR 1 +#define PROP_GRABSRCBLEND 2 +#define PROP_GRABDSTBLEND 0 +#define PROPM_START_REFRACTION 0 +#define PROP_REFRACTIONENABLED 0 +#define PROP_REFRACTIONINDEX 1.333333 +#define PROP_REFRACTIONCHROMATICABERATTION 0 +#define PROPM_END_REFRACTION 0 +#define PROPM_START_BLUR 0 +#define PROP_ENABLEBLUR 0 +#define PROP_GRABBLURDISTANCE 0 +#define PROP_GRABBLURQUALITY 2 +#define PROP_GRABBLURDIRECTIONS 4 +#define PROPM_END_BLUR 0 +#define PROPM_END_GRABPASS 0 +#define PROPM_START_IRIDESCENCE 0 +#define PROP_ENABLEIRIDESCENCE 0 +#define PROP_IRIDESCENCENORMALTOGGLE 0 +#define PROP_IRIDESCENCENORMALINTENSITY 1 +#define PROP_IRIDESCENCENORMALUV 0 +#define PROP_IRIDESCENCEMASKUV 0 +#define PROP_IRIDESCENCENORMALSELECTION 1 +#define PROP_IRIDESCENCEINTENSITY 1 +#define PROP_IRIDESCENCEADDBLEND 0 +#define PROP_IRIDESCENCEREPLACEBLEND 0 +#define PROP_IRIDESCENCEMULTIPLYBLEND 0 +#define PROP_IRIDESCENCEEMISSIONSTRENGTH 0 +#define PROP_IRIDESCENCETIME 0 +#define PROPM_END_IRIDESCENCE 0 +#define PROPM_START_VERTEXGLITCH 0 +#define PROP_ENABLEVERTEXGLITCH 0 +#define PROP_VERTEXGLITCHFREQUENCY 0 +#define PROP_VERTEXGLITCHTHRESHOLD 1 +#define PROP_VERTEXGLITCHSTRENGTH 1 +#define PROPM_END_VERTEXGLITCH 0 +#define PROPM_START_SPAWNS 0 +#define PROPM_START_SCIFISPAWNIN 0 +#define PROP_ENABLESCIFISPAWNIN 0 +#define PROP_SPAWNINNOISEINTENSITY 0.35 +#define PROP_SPAWNINALPHA 0 +#define PROP_SPAWNINEMISSIONOFFSET 0.1 +#define PROP_SPAWNINVERTOFFSET 10 +#define PROP_SPAWNINVERTOFFSETOFFSET 0.1 +#define PROPM_END_SCIFISPAWNIN 0 +#define PROPM_END_SPAWNS 0 +#define PROPM_START_VORONOI 0 +#define PROP_VORONOITYPE 1 +#define PROP_VORONOISPACE 0 +#define PROP_VORONOIBLEND 0 +#define PROP_ENABLEVORONOI 0 +#define PROP_VORONOIEFFECTSMATERIALALPHA 0 +#define PROP_VORONOIMASKUV 0 +#define PROP_VORONOINOISEUV 0 +#define PROP_VORONOINOISEINTENSITY 0.1 +#define PROP_VORONOIEMISSION0 0 +#define PROP_VORONOIEMISSION1 0 +#define PROP_VORONOISCALE 5 +#define PROPM_START_VORONOIRANDOM 0 +#define PROP_VORONOIENABLERANDOMCELLCOLOR 0 +#define PROPM_END_VORONOIRANDOM 0 +#define PROPM_END_VORONOI 0 +#define PROPM_START_BLACKLIGHT 0 +#define PROP_BLACKLIGHTMASKENABLED 0 +#define PROP_BLACKLIGHTMASKDEBUG 0 +#define PROP_BLACKLIGHTMASKMETALLIC 4 +#define PROP_BLACKLIGHTMASKCLEARCOAT 4 +#define PROP_BLACKLIGHTMASKMATCAP 4 +#define PROP_BLACKLIGHTMASKMATCAP2 4 +#define PROP_BLACKLIGHTMASKEMISSION 4 +#define PROP_BLACKLIGHTMASKEMISSION2 4 +#define PROP_BLACKLIGHTMASKFLIPBOOK 4 +#define PROP_BLACKLIGHTMASKDISSOLVE 4 +#define PROP_BLACKLIGHTMASKPANOSPHERE 4 +#define PROP_BLACKLIGHTMASKGLITTER 4 +#define PROP_BLACKLIGHTMASKIRIDESCENCE 4 +#define PROPM_END_BLACKLIGHT 0 +#define PROPM_OUTLINEOPTIONS 0 +#define PROP_COMMENTIFZERO_ENABLEOUTLINEPASS 0 +#define PROP_OUTLINEMODE 0 +#define PROP_OUTLINETINTMIX 0 +#define PROP_OUTLINERIMLIGHTBLEND 0 +#define PROP_OUTLINEFIXEDSIZE 0 +#define PROP_OUTLINESMAXDISTANCE 9999 +#define PROP_OUTLINEUSEVERTEXCOLORS 0 +#define PROP_OUTLINELIT 1 +#define PROP_LINEWIDTH 0 +#define PROP_OUTLINEEMISSION 0 +#define PROP_OUTLINETEXTUREUV 0 +#define PROP_OUTLINEMASKUV 0 +#define PROP_OUTLINESHADOWSTRENGTH 1 +#define PROPM_START_OUTLINEADVANCED 0 +#define PROP_OUTLINECULL 1 +#define PROP_OUTLINEOFFSETFACTOR 0 +#define PROP_OUTLINEOFFSETUNITS 0 +#define PROPM_END_OUTLINEADVANCED 0 +#define PROPM_PARALLAXMAP 0 +#define PROP_PARALLAXMAP 0 +#define PROP_PARALLAXHEIGHTMAPENABLED 0 +#define PROP_PARALLAXINTERNALMAPENABLED 0 +#define PROPM_START_PARALLAXHEIGHTMAP 0 +#define PROP_PARALLAXUV 0 +#define PROP_PARALLAXHEIGHTMAPMASKUV 0 +#define PROP_PARALLAXSTRENGTH 0 +#define PROPM_END_PARALLAXHEIGHTMAP 0 +#define PROPM_START_PARALLAXINTERNAL 0 +#define PROP_PARALLAXINTERNALHEIGHTMAPMODE 0 +#define PROP_PARALLAXINTERNALHEIGHTFROMALPHA 0 +#define PROP_PARALLAXINTERNALMAPMASKUV 0 +#define PROP_PARALLAXINTERNALITERATIONS 1 +#define PROP_PARALLAXINTERNALMINDEPTH 0 +#define PROP_PARALLAXINTERNALMAXDEPTH 1 +#define PROP_PARALLAXINTERNALMINFADE 0 +#define PROP_PARALLAXINTERNALMAXFADE 1 +#define PROPM_END_PARALLAXINTERNAL 0 +#define PROPM_START_PARALLAXADVANCED 0 +#define PROP_PARALLAXBIAS 0.42 +#define PROPM_END_PARALLAXADVANCED 0 +#define PROPM_THIRDPARTY 1 +#define PROPM_START_RALIV 1 +#define PROP_RALIVHELP 0 +#define PROPM_START_RALIVPENETRATOR 1 +#define PROP_PENETRATORENABLED 1 +#define PROP_SQUEEZE 0.032 +#define PROP_SQUEEZEDIST 0.0259 +#define PROP_BULGEOFFSET 0.158 +#define PROP_BULGEPOWER 0.00127 +#define PROP_LENGTH 0.12 +#define PROP_ENTRANCESTIFFNESS 0.01 +#define PROP_CURVATURE 0.324 +#define PROP_RECURVATURE -0.145 +#define PROP_WRIGGLESPEED 6.2 +#define PROP_WRIGGLE 0 +#define PROP__DIRTY 1 +#define PROPM_END_RALIVPENETRATOR 0 +#define PROPM_START_RALIVORIFACE 0 +#define PROP_ORIFACEENABLED 0 +#define PROP_ENTRYOPENDURATION 0.1 +#define PROP_SHAPE1DEPTH 0.1 +#define PROP_SHAPE1DURATION 0.1 +#define PROP_SHAPE2DEPTH 0.2 +#define PROP_SHAPE2DURATION 0.1 +#define PROP_SHAPE3DEPTH 0.3 +#define PROP_SHAPE3DURATION 0.1 +#define PROP_BLENDSHAPEPOWER 1 +#define PROP_BLENDSHAPEBADSCALEFIX 1 +#define PROPM_END_RALIVORIFACE 0 +#define PROPM_START_RALIVADVANCED 0 +#define PROP_RALIVADVANCEDHELP 0 +#define PROP_ORIFICECHANNEL 0 +#define PROPM_END_RALIVADVANCED 0 +#define PROPM_END_RALIV 0 +#define PROPM_RENDERINGOPTIONS 0 +#define PROP_CULL 2 +#define PROP_ZTEST 4 +#define PROP_ZWRITE 1 +#define PROP_COLORMASK 15 +#define PROP_OFFSETFACTOR 0 +#define PROP_OFFSETUNITS 0 +#define PROP_IGNOREFOG 0 +#define PROPINSTANCING 0 +#define PROPM_START_BLENDING 0 +#define PROP_BLENDOP 0 +#define PROP_BLENDOPALPHA 0 +#define PROP_SRCBLEND 1 +#define PROP_DSTBLEND 0 +#define PROPM_END_BLENDING 0 +#define PROPM_START_STENCILPASSOPTIONS 0 +#define PROP_STENCILREF 0 +#define PROP_STENCILREADMASK 255 +#define PROP_STENCILWRITEMASK 255 +#define PROP_STENCILPASSOP 0 +#define PROP_STENCILFAILOP 0 +#define PROP_STENCILZFAILOP 0 +#define PROP_STENCILCOMPAREFUNCTION 8 +#define PROPM_END_STENCILPASSOPTIONS 0 +#define PROPM_START_OUTLINESTENCIL 0 +#define PROP_OUTLINESTENCILREF 0 +#define PROP_OUTLINESTENCILREADMASK 255 +#define PROP_OUTLINESTENCILWRITEMASK 255 +#define PROP_OUTLINESTENCILPASSOP 0 +#define PROP_OUTLINESTENCILFAILOP 0 +#define PROP_OUTLINESTENCILZFAILOP 0 +#define PROP_OUTLINESTENCILCOMPAREFUNCTION 8 +#define PROPM_END_OUTLINESTENCIL 0 +#define PROPM_START_DEBUGOPTIONS 0 +#define PROP_DEBUGENABLED 0 +#define PROP_VERTEXUNWRAP 0 +#define PROP_DEBUGMESHDATA 0 +#define PROP_DEBUGLIGHTINGDATA 0 +#define PROP_DEBUGCAMERADATA 0 +#define PROPM_END_DEBUGOPTIONS 0 + + + #pragma target 5.0 + #define FORWARD_ADD_PASS + float _Mode; + // Add Pass Features + // Decal +// #pragma shader_feature GEOM_TYPE_BRANCH +// #pragma shader_feature GEOM_TYPE_BRANCH_DETAIL +// #pragma shader_feature GEOM_TYPE_FROND +// #pragma shader_feature DEPTH_OF_FIELD_COC_VIEW + // patreon Additive + // Black Light Mask +// #pragma shader_feature _SPECULARHIGHLIGHTS_OFF + // voronoi +// #pragma shader_feature CHROMATIC_ABERRATION + // UV Distortion +// #pragma shader_feature USER_LUT + // Vertex Offsets +// #pragma shader_feature AUTO_EXPOSURE + // Bulge +// #pragma shader_feature BLOOM_LOW + //Audio Link +// #pragma shader_feature COLOR_GRADING_LOG_VIEW +// #pragma shader_feature _PARALLAX_MAP + // Mirror +// #pragma shader_feature _REQUIRE_UV2 + // Random +// #pragma shader_feature _SUNDISK_NONE + // Hue Shift +// #pragma shader_feature COLOR_GRADING_HDR + // Dissolve +// #pragma shader_feature DISTORT + // Panosphere +// #pragma shader_feature _DETAIL_MULX2 + // Lighting +// #pragma shader_feature VIGNETTE_MASKED + // Flipbook +// #pragma shader_feature _SUNDISK_HIGH_QUALITY + // Rim Lighting +// #pragma shader_feature _GLOSSYREFLECTIONS_OFF + // Metal +// #pragma shader_feature _METALLICGLOSSMAP + // Poi Shader Model +// #pragma shader_feature VIGNETTE_CLASSIC + // Iridescence +// #pragma shader_feature BLOOM_LENS_DIRT + // Matcap +// #pragma shader_feature _COLORADDSUBDIFF_ON + // Matcap 2 +// #pragma shader_feature COLOR_GRADING_HDR_3D + // Specular +// #pragma shader_feature _SPECGLOSSMAP + // Specular 2 +// #pragma shader_feature DITHERING + // SubSurface +// #pragma shader_feature _TERRAIN_NORMAL_MAP + // RGBMask +// #pragma shader_feature VIGNETTE + // RGB NORMALS +// #pragma shader_feature GEOM_TYPE_MESH + //Details +// #pragma shader_feature FINALPASS + // Text +// #pragma shader_feature EFFECT_BUMP + // Debug +// #pragma shader_feature _COLOROVERLAY_ON + // Glitter +// #pragma shader_feature _SUNDISK_SIMPLE + // Disable Directionals +// #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A + // Emission +// #pragma shader_feature _EMISSION + #pragma multi_compile_instancing + #pragma multi_compile_fwdadd_fullshadows + #pragma vertex vert + #pragma fragment frag + #include "../Includes/CGI_PoiPass.cginc" + ENDCG + + } + +// //EnableOutlinePass +// Pass +// { +// Name "Outline" +// Tags { "LightMode" = "ForwardBase" } +// Stencil +// { +// Ref [_OutlineStencilRef] +// ReadMask [_OutlineStencilReadMask] +// WriteMask [_OutlineStencilWriteMask] +// Comp [_OutlineStencilCompareFunction] +// Pass [_OutlineStencilPassOp] +// Fail [_OutlineStencilFailOp] +// ZFail [_OutlineStencilZFailOp] +// } +// ZTest [_ZTest] +// ColorMask [_ColorMask] +// Offset [_OutlineOffsetFactor], [_OutlineOffsetUnits] +// BlendOp [_BlendOp], [_BlendOpAlpha] +// Blend [_SrcBlend] [_DstBlend] +// ZWrite [_ZWrite] +// AlphaToMask [_AlphaToMask] +// Cull [_OutlineCull] +// CGPROGRAM +// +// #pragma target 5.0 +// #define FORWARD_BASE_PASS +// #define OUTLINE +// float _Mode; +// #pragma multi_compile _ VERTEXLIGHT_ON +// // patreon Additive +// // Black Light Mask +//// #pragma shader_feature _SPECULARHIGHLIGHTS_OFF +// // voronoi +//// #pragma shader_feature CHROMATIC_ABERRATION +// // UV Distortion +//// #pragma shader_feature USER_LUT +// // Vertex Offsets +//// #pragma shader_feature AUTO_EXPOSURE +// // Mirror +//// #pragma shader_feature _REQUIRE_UV2 +// // Random +//// #pragma shader_feature _SUNDISK_NONE +// // Dissolve +//// #pragma shader_feature DISTORT +// // Lighting +//// #pragma shader_feature VIGNETTE_MASKED +// #pragma multi_compile_fwdbase +// #pragma fragmentoption ARB_precision_hint_fastest +// #pragma multi_compile_fog +// #pragma multi_compile_instancing +// #pragma vertex vert +// #pragma fragment frag +// #include "../Includes/CGI_PoiPassOutline.cginc" +// ENDCG +// +// } + //EnableOutlinePass + + //LightingCastShadows + Pass + { + Name "ShadowCasterPass" + Tags { "LightMode" = "ShadowCaster" } + Stencil + { + Ref [_StencilRef] + Comp [_StencilCompareFunction] + Pass [_StencilPassOp] + Fail [_StencilFailOp] + ZFail [_StencilZFailOp] + } + AlphaToMask Off + ZWrite [_ZWrite] + Cull [_Cull] + ZTest [_ZTest] + ColorMask [_ColorMask] + Offset [_OffsetFactor], [_OffsetUnits] + CGPROGRAM +#define OPTIMIZER_ENABLED +#define VIGNETTE_MASKED +#define _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A +#define PROPSHADER_IS_USING_THRY_EDITOR 69 +#define PROPSHADER_MASTER_LABEL 0 +#define PROPSHADER_PRESETS 0 +#define PROPSHADER_PROPERTIES_LABEL_FILE 0 +#define PROPFOOTER_YOUTUBE 0 +#define PROPFOOTER_TWITTER 0 +#define PROPFOOTER_PATREON 0 +#define PROPFOOTER_DISCORD 0 +#define PROPFOOTER_GITHUB 0 +#define PROP_FORGOTTOLOCKMATERIAL 1 +#define PROP_SHADEROPTIMIZERENABLED 1 +#define PROP_LOCKTOOLTIP 0 +#define PROP_MODE 0 +#define PROPM_MAINOPTIONS 1 +#define PROP_MAINTEX +#define PROP_MAINTEXTUREUV 0 +#define PROP_MAINEMISSIONSTRENGTH 0 +#define PROP_BUMPMAPUV 0 +#define PROP_BUMPSCALE 1 +#define PROP_CLIPPINGMASKUV 0 +#define PROP_INVERSE_CLIPPING 0 +#define PROPM_START_MAINHUESHIFT 0 +#define PROP_MAINCOLORADJUSTTEXTUREUV 0 +#define PROP_MAINHUESHIFTREPLACE 0 +#define PROP_MAINHUESHIFT 0 +#define PROP_MAINHUESHIFTSPEED 0 +#define PROP_SATURATION 0 +#define PROP_MAINBRIGHTNESS 0 +#define PROP_MAINHUESHIFTTOGGLE 0 +#define PROPM_END_MAINHUESHIFT 0 +#define PROPM_START_RGBMASK 0 +#define PROP_RGBMASKENABLED 0 +#define PROP_RGBUSEVERTEXCOLORS 0 +#define PROP_RGBBLENDMULTIPLICATIVE 0 +#define PROP_RGBMASKUV 0 +#define PROP_RGBRED_UV 0 +#define PROP_RGBGREEN_UV 0 +#define PROP_RGBBLUE_UV 0 +#define PROP_RGBNORMALSENABLED 0 +#define PROP_RGBNORMALBLEND 0 +#define PROP_RGBNORMALRUV 0 +#define PROP_RGBNORMALRSCALE 0 +#define PROP_RGBNORMALGUV 0 +#define PROP_RGBNORMALGSCALE 0 +#define PROP_RGBNORMALBUV 0 +#define PROP_RGBNORMALBSCALE 0 +#define PROPM_END_RGBMASK 0 +#define PROPM_START_DETAILOPTIONS 0 +#define PROP_DETAILENABLED 0 +#define PROP_DETAILMASKUV 0 +#define PROP_DETAILTEXUV 0 +#define PROP_DETAILTEXINTENSITY 1 +#define PROP_DETAILBRIGHTNESS 1 +#define PROP_DETAILNORMALMAPSCALE 1 +#define PROP_DETAILNORMALMAPUV 0 +#define PROPM_END_DETAILOPTIONS 0 +#define PROPM_START_MAINVERTEXCOLORS 0 +#define PROP_MAINVERTEXCOLORING 0 +#define PROP_MAINUSEVERTEXCOLORALPHA 0 +#define PROPM_END_MAINVERTEXCOLORS 0 +#define PROPM_START_VERTEXMANIPULATION 0 +#define PROP_VERTEXMANIPULATIONSENABLED 0 +#define PROP_VERTEXMANIPULATIONHEIGHT 0 +#define PROP_VERTEXMANIPULATIONHEIGHTUV 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBIAS 0 +#define PROP_VERTEXROUNDINGENABLED 0 +#define PROP_VERTEXROUNDINGDIVISION 500 +#define PROPM_END_VERTEXMANIPULATION 0 +#define PROPM_START_ALPHA 0 +#define PROP_CUTOFF 0.5 +#define PROP_DITHERINGENABLED 0 +#define PROP_DITHERGRADIENT 0.1 +#define PROP_FORCEOPAQUE 0 +#define PROP_MAINSHADOWCLIPMOD 0 +#define PROP_ALPHATOMASK 0 +#define PROP_MAINALPHATOCOVERAGE 0 +#define PROP_MAINMIPSCALE 0.25 +#define PROP_ALPHAPREMULTIPLY 0 +#define PROP_ALPHAMOD 0 +#define PROPM_END_ALPHA 0 +#define PROPM_START_DECALSECTION 0 +#define PROP_DECALMASKUV 0 +#define PROPM_START_DECAL0 0 +#define PROP_DECALENABLED 0 +#define PROP_DECALEMISSIONSTRENGTH 0 +#define PROP_DECALTEXTUREUV 0 +#define PROP_DECALTILED 0 +#define PROP_DECAL0DEPTH 0 +#define PROP_DECALROTATION 0 +#define PROP_DECALROTATIONSPEED 0 +#define PROP_DECALBLENDTYPE 0 +#define PROP_DECALBLENDALPHA 1 +#define PROP_DECALHUESHIFTENABLED 0 +#define PROP_DECALHUESHIFTSPEED 0 +#define PROP_DECALHUESHIFT 0 +#define PROPM_START_DECAL0AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL0SCALEBAND 0 +#define PROP_AUDIOLINKDECAL0ALPHABAND 0 +#define PROP_AUDIOLINKDECAL0EMISSIONBAND 0 +#define PROPM_END_DECAL0AUDIOLINK 0 +#define PROPM_END_DECAL0 0 +#define PROPM_START_DECAL1 0 +#define PROP_DECALENABLED1 0 +#define PROP_DECALEMISSIONSTRENGTH1 0 +#define PROP_DECALTEXTURE1UV 0 +#define PROP_DECALTILED1 0 +#define PROP_DECAL1DEPTH 0 +#define PROP_DECALROTATION1 0 +#define PROP_DECALROTATIONSPEED1 0 +#define PROP_DECALBLENDTYPE1 0 +#define PROP_DECALBLENDALPHA1 1 +#define PROP_DECALHUESHIFTENABLED1 0 +#define PROP_DECALHUESHIFTSPEED1 0 +#define PROP_DECALHUESHIFT1 0 +#define PROPM_START_DECAL1AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL1SCALEBAND 0 +#define PROP_AUDIOLINKDECAL1ALPHABAND 0 +#define PROP_AUDIOLINKDECAL1EMISSIONBAND 0 +#define PROPM_END_DECAL1AUDIOLINK 0 +#define PROPM_END_DECAL1 0 +#define PROPM_START_DECAL2 0 +#define PROP_DECALENABLED2 0 +#define PROP_DECALEMISSIONSTRENGTH2 0 +#define PROP_DECALTEXTURE2UV 0 +#define PROP_DECALTILED2 0 +#define PROP_DECAL2DEPTH 0 +#define PROP_DECALROTATION2 0 +#define PROP_DECALROTATIONSPEED2 0 +#define PROP_DECALBLENDTYPE2 0 +#define PROP_DECALBLENDALPHA2 1 +#define PROP_DECALHUESHIFTENABLED2 0 +#define PROP_DECALHUESHIFTSPEED2 0 +#define PROP_DECALHUESHIFT2 0 +#define PROPM_START_DECAL2AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL2SCALEBAND 0 +#define PROP_AUDIOLINKDECAL2ALPHABAND 0 +#define PROP_AUDIOLINKDECAL2EMISSIONBAND 0 +#define PROPM_END_DECAL2AUDIOLINK 0 +#define PROPM_END_DECAL2 0 +#define PROPM_START_DECAL3 0 +#define PROP_DECALENABLED3 0 +#define PROP_DECALEMISSIONSTRENGTH3 0 +#define PROP_DECALTEXTURE3UV 0 +#define PROP_DECALTILED3 0 +#define PROP_DECAL3DEPTH 0 +#define PROP_DECALROTATION3 0 +#define PROP_DECALROTATIONSPEED3 0 +#define PROP_DECALBLENDTYPE3 0 +#define PROP_DECALBLENDALPHA3 1 +#define PROP_DECALHUESHIFTENABLED3 0 +#define PROP_DECALHUESHIFTSPEED3 0 +#define PROP_DECALHUESHIFT3 0 +#define PROPM_START_DECAL3AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL3SCALEBAND 0 +#define PROP_AUDIOLINKDECAL3ALPHABAND 0 +#define PROP_AUDIOLINKDECAL3EMISSIONBAND 0 +#define PROPM_END_DECAL3AUDIOLINK 0 +#define PROPM_END_DECAL3 0 +#define PROPM_END_DECALSECTION 0 +#define PROPM_START_BACKFACE 0 +#define PROP_BACKFACEENABLED 0 +#define PROP_BACKFACETEXTUREUV 0 +#define PROP_BACKFACEDETAILINTENSITY 1 +#define PROP_BACKFACEHUESHIFT 0 +#define PROP_BACKFACEEMISSIONSTRENGTH 0 +#define PROPM_END_BACKFACE 0 +#define PROPM_LIGHTINGOPTIONS 1 +#define PROPM_START_LIGHTING 1 +#define PROP_ENABLELIGHTING 1 +#define PROP_LIGHTINGMODE 4 +#define PROP_LIGHTINGSTANDARDSMOOTHNESS 0 +#define PROP_LIGHTINGWRAPPEDWRAP 0 +#define PROP_LIGHTINGWRAPPEDNORMALIZATION 0 +#define PROP_LIGHTINGRAMPTYPE 0 +#define PROP_1ST_SHADEMAPUV 0 +#define PROP_USE_1STSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_1STSHADEMAPMASK_INVERSE 0 +#define PROP_USE_BASEAS1ST 0 +#define PROP_2ND_SHADEMAPUV 0 +#define PROP_USE_2NDSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_2NDSHADEMAPMASK_INVERSE 0 +#define PROP_USE_1STAS2ND 0 +#define PROP_BASECOLOR_STEP 0.5 +#define PROP_BASESHADE_FEATHER 0.0001 +#define PROP_SHADECOLOR_STEP 0 +#define PROP_1ST2ND_SHADES_FEATHER 0.0001 +#define PROP_TOONRAMP +#define PROP_LIGHTINGSHADOWMASKUV 0 +#define PROP_SHADOWOFFSET 0 +#define PROP_LIGHTINGGRADIENTSTART 0 +#define PROP_LIGHTINGGRADIENTEND 0.5 +#define PROP_SSSSCALE 1 +#define PROP_SSSBUMPBLUR 0.7 +#define PROP_SHADOWSTRENGTH 0 +#define PROP_ATTENUATIONMULTIPLIER 0 +#define PROP_LIGHTINGIGNOREAMBIENTCOLOR 0 +#define PROPM_START_LIGHTINGMODIFIERS 0 +#define PROP_LIGHTINGDIRECTCOLORMODE 0 +#define PROP_LIGHTINGINDIRECTCOLORMODE 0 +#define PROP_LIGHTINGUNCAPPED 0 +#define PROP_LIGHTINGONLYUNITYSHADOWS 0 +#define PROP_LIGHTINGMONOCHROMATIC 0 +#define PROP_LIGHTINGMINLIGHTBRIGHTNESS 0 +#define PROP_LIGHTINGMINSHADOWBRIGHTNESSRATIO 0 +#define PROPM_END_LIGHTINGMODIFIERS 0 +#define PROPM_START_DETAILSHADOWS 0 +#define PROP_LIGHTINGDETAILSHADOWSENABLED 0 +#define PROP_LIGHTINGDETAILSHADOWSUV 0 +#define PROP_LIGHTINGDETAILSTRENGTH 1 +#define PROPM_END_DETAILSHADOWS 0 +#define PROPM_START_AMBIENTOCCLUSION 0 +#define PROP_LIGHTINGENABLEAO 0 +#define PROP_LIGHTINGAOTEXUV 0 +#define PROP_AOSTRENGTH 1 +#define PROPM_END_AMBIENTOCCLUSION 0 +#define PROPM_START_LIGHTINGHSL 0 +#define PROP_LIGHTINGENABLEHSL 0 +#define PROP_LIGHTINGHSLINTENSITY 1 +#define PROP_LIGHTINGSHADOWHUE 0.5 +#define PROP_LIGHTINGSHADOWSATURATION 0.5 +#define PROP_LIGHTINGSHADOWLIGHTNESS 0.5 +#define PROPM_END_LIGHTINGHSL 0 +#define PROPM_START_LIGHTINGADVANCED 0 +#define PROP_COMMENTIFZERO_LIGHTINGADDITIVEENABLE 1 +#define PROP_LIGHTINGADDITIVETYPE 1 +#define PROP_LIGHTINGADDITIVEGRADIENTSTART 0 +#define PROP_LIGHTINGADDITIVEGRADIENTEND 0.5 +#define PROP_LIGHTINGADDITIVEPASSTHROUGH 0.5 +#define PROP_LIGHTINGADDITIVEDETAILSTRENGTH 1 +#define PROP_LIGHTINGADDITIVELIMITINTENSITY 0 +#define PROP_LIGHTINGADDITIVEMAXINTENSITY 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROPM_END_LIGHTINGADVANCED 0 +#define PROPM_END_LIGHTING 0 +#define PROPM_START_SUBSURFACE 0 +#define PROP_ENABLESSS 0 +#define PROP_SSSTHICKNESSMAPUV 0 +#define PROP_SSSTHICKNESSMOD 0 +#define PROP_SSSSCALE 0.25 +#define PROP_SSSPOWER 5 +#define PROP_SSSDISTORTION 1 +#define PROPM_END_SUBSURFACE 0 +#define PROPM_START_RIMLIGHTOPTIONS 0 +#define PROP_ENABLERIMLIGHTING 0 +#define PROP_RIMLIGHTNORMAL 1 +#define PROP_RIMLIGHTINGINVERT 0 +#define PROP_RIMWIDTH 0.8 +#define PROP_RIMSHARPNESS 0.1 +#define PROP_RIMSTRENGTH 0 +#define PROP_RIMBRIGHTEN 0 +#define PROP_RIMLIGHTCOLORBIAS 1 +#define PROP_RIMTEXUV 0 +#define PROP_RIMMASKUV 0 +#define PROPM_START_RIMHUESHIFT 0 +#define PROP_RIMHUESHIFTENABLED 0 +#define PROP_RIMHUESHIFTSPEED 0 +#define PROP_RIMHUESHIFT 0 +#define PROPM_END_RIMHUESHIFT 0 +#define PROPM_START_RIMWIDTHNOISE 0 +#define PROP_RIMWIDTHNOISETEXTUREUV 0 +#define PROP_RIMWIDTHNOISESTRENGTH 0.1 +#define PROPM_END_RIMWIDTHNOISE 0 +#define PROPM_START_SHADOWMIX 0 +#define PROP_SHADOWMIX 0 +#define PROP_SHADOWMIXTHRESHOLD 0.5 +#define PROP_SHADOWMIXWIDTHMOD 0.5 +#define PROPM_END_SHADOWMIX 0 +#define PROPM_END_RIMLIGHTOPTIONS 0 +#define PROPM_START_REFLECTIONRIM 0 +#define PROP_ENABLEENVIRONMENTALRIM 0 +#define PROP_RIMENVIROMASKUV 0 +#define PROP_RIMENVIROBLUR 0.7 +#define PROP_RIMENVIROWIDTH 0.45 +#define PROP_RIMENVIROSHARPNESS 0 +#define PROP_RIMENVIROMINBRIGHTNESS 0 +#define PROP_RIMENVIROINTENSITY 1 +#define PROPM_END_REFLECTIONRIM 0 +#define PROPM_START_BAKEDLIGHTING 0 +#define PROP_SPECULARLMOCCLUSION 0 +#define PROP_SPECLMOCCLUSIONADJUST 0.2 +#define PROP_GIEMISSIONMULTIPLIER 1 +#define PROPDSGI 0 +#define PROPLIGHTMAPFLAGS 0 +#define PROPM_END_BAKEDLIGHTING 0 +#define PROP_LOCKTOOLTIP 0 +#define PROPM_START_BRDF 0 +#define PROP_ENABLEBRDF 0 +#define PROP_BRDFMETALLICGLOSSMAPTOOLTIP 0 +#define PROP_BRDFINVERTGLOSSINESS 0 +#define PROP_BRDFMETALLICGLOSSMAPUV 0 +#define PROP_BRDFSPECULARMAPTOOLTIP 0 +#define PROP_BRDFSPECULARMAPUV 0 +#define PROP_BRDFMETALLICMAPTOOLTIP 0 +#define PROP_BRDFMETALLICMAPUV 0 +#define PROP_BRDFMETALLIC 0 +#define PROP_BRDFGLOSSINESS 0 +#define PROP_BRDFREFLECTANCE 0.5 +#define PROP_BRDFANISOTROPY 0 +#define PROP_BRDFREFLECTIONSENABLED 1 +#define PROP_BRDFSPECULARENABLED 1 +#define PROP_BRDFFALLBACK +#define PROP_BRDFFORCEFALLBACK 0 +#define PROPM_END_BRDF 0 +#define PROPM_START_METALLIC 0 +#define PROP_ENABLEMETALLIC 0 +#define PROP_CUBEMAP +#define PROP_SAMPLEWORLD 0 +#define PROP_METALLICTINTMAPUV 0 +#define PROP_METALLICMASKUV 0 +#define PROP_METALLIC 0 +#define PROP_SMOOTHNESSMASKUV 0 +#define PROP_INVERTSMOOTHNESS 0 +#define PROP_SMOOTHNESS 0 +#define PROPM_END_METALLIC 0 +#define PROPM_START_CLEARCOAT 0 +#define PROP_ENABLECLEARCOAT 0 +#define PROP_CLEARCOATHELPBOX 0 +#define PROP_CLEARCOATMAPUV 0 +#define PROP_CLEARCOATINVERTSMOOTHNESS 0 +#define PROP_CLEARCOAT 1 +#define PROP_CLEARCOATGLOSSINESS 0 +#define PROP_CLEARCOATANISOTROPY 0 +#define PROP_CLEARCOATENABLEREFLECTIONS 1 +#define PROP_CLEARCOATENABLESPECULAR 1 +#define PROP_CLEARCOATFORCEFALLBACK 0 +#define PROPM_END_CLEARCOAT 0 +#define PROPM_START_MATCAP 0 +#define PROP_MATCAPENABLE 0 +#define PROP_MATCAPBORDER 0.43 +#define PROP_MATCAPMASKUV 0 +#define PROP_MATCAPMASKINVERT 0 +#define PROP_MATCAPEMISSIONSTRENGTH 0 +#define PROP_MATCAPINTENSITY 1 +#define PROP_MATCAPLIGHTMASK 0 +#define PROP_MATCAPREPLACE 1 +#define PROP_MATCAPMULTIPLY 0 +#define PROP_MATCAPADD 0 +#define PROP_MATCAPNORMAL 1 +#define PROPM_START_MATCAPHUESHIFT 0 +#define PROP_MATCAPHUESHIFTENABLED 0 +#define PROP_MATCAPHUESHIFTSPEED 0 +#define PROP_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAP 0 +#define PROPM_START_MATCAP2 0 +#define PROP_MATCAP2ENABLE 0 +#define PROP_MATCAP2BORDER 0.43 +#define PROP_MATCAP2MASKUV 0 +#define PROP_MATCAP2MASKINVERT 0 +#define PROP_MATCAP2EMISSIONSTRENGTH 0 +#define PROP_MATCAP2INTENSITY 1 +#define PROP_MATCAP2LIGHTMASK 0 +#define PROP_MATCAP2REPLACE 0 +#define PROP_MATCAP2MULTIPLY 0 +#define PROP_MATCAP2ADD 0 +#define PROP_MATCAP2NORMAL 1 +#define PROPM_START_MATCAP2HUESHIFT 0 +#define PROP_MATCAP2HUESHIFTENABLED 0 +#define PROP_MATCAP2HUESHIFTSPEED 0 +#define PROP_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2 0 +#define PROPM_START_SPECULAR 0 +#define PROP_ENABLESPECULAR 0 +#define PROP_SPECULARTYPE 1 +#define PROP_SPECULARNORMAL 1 +#define PROP_SPECULARMETALLIC 0 +#define PROP_SPECULARMETALLICMAPUV 0 +#define PROP_SPECULARSMOOTHNESS 1 +#define PROP_SPECULARMAPUV 0 +#define PROP_SPECULARINVERTSMOOTHNESS 0 +#define PROP_SPECULARMASKUV 0 +#define PROP_SMOOTHNESSFROM 1 +#define PROP_SPECWHATTANGENT 0 +#define PROP_ANISOSPEC1ALPHA 1 +#define PROP_ANISOSPEC2ALPHA 1 +#define PROP_SPEC1OFFSET 0 +#define PROP_SPEC2SMOOTHNESS 0 +#define PROP_ANISOUSETANGENTMAP 0 +#define PROP_ANISOTANGENTMAPUV 0 +#define PROP_SPECULARTOONSTART 0.95 +#define PROP_SPECULARTOONEND 1 +#define PROP_SPECULARANISOJITTERMIRRORED 0 +#define PROP_SPECULARANISOJITTERMICROMULTIPLIER 0 +#define PROP_SPECULARANISOJITTERMICROUV 0 +#define PROP_SPECULARANISOJITTERMACROMULTIPLIER 0 +#define PROP_SPECULARANISOJITTERMACROUV 0 +#define PROPM_END_SPECULAR 0 +#define PROPM_START_SPECULAR1 0 +#define PROP_ENABLESPECULAR1 0 +#define PROP_SPECULARTYPE1 1 +#define PROP_SPECULARNORMAL1 1 +#define PROP_SPECULARMETALLIC1 0 +#define PROP_SPECULARMETALLICMAP1UV 0 +#define PROP_SPECULARSMOOTHNESS1 0.75 +#define PROP_SPECULARMAP1UV 0 +#define PROP_SPECULARINVERTSMOOTHNESS1 0 +#define PROP_SPECULARMASK1UV 0 +#define PROP_SMOOTHNESSFROM1 1 +#define PROP_SPECWHATTANGENT1 0 +#define PROP_ANISOSPEC1ALPHA1 1 +#define PROP_ANISOSPEC2ALPHA1 1 +#define PROP_SPEC1OFFSET1 0 +#define PROP_SPEC2SMOOTHNESS1 0 +#define PROP_ANISOUSETANGENTMAP1 0 +#define PROP_ANISOTANGENTMAP1UV 0 +#define PROP_SPECULARTOONSTART1 0.95 +#define PROP_SPECULARTOONEND1 1 +#define PROP_SPECULARANISOJITTERMIRRORED1 0 +#define PROP_SPECULARANISOJITTERMICROMULTIPLIER1 0 +#define PROP_SPECULARANISOJITTERMICRO1UV 0 +#define PROP_SPECULARANISOJITTERMACROMULTIPLIER1 0 +#define PROP_SPECULARANISOJITTERMACRO1UV 0 +#define PROPM_END_SPECULAR1 0 +#define PROPM_SPECIAL_EFFECTS 0 +#define PROPM_START_EMISSIONOPTIONS 0 +#define PROP_ENABLEEMISSION 0 +#define PROP_EMISSIONREPLACE 0 +#define PROP_EMISSIONBASECOLORASMAP 0 +#define PROP_EMISSIONMAPUV 0 +#define PROP_EMISSIONMASKUV 0 +#define PROP_EMISSIONSTRENGTH 0 +#define PROP_EMISSIONHUESHIFTENABLED 0 +#define PROP_EMISSIONHUESHIFT 0 +#define PROP_EMISSIONHUESHIFTSPEED 0 +#define PROPM_START_CENTEROUTEMISSION 0 +#define PROP_EMISSIONCENTEROUTENABLED 0 +#define PROP_EMISSIONCENTEROUTSPEED 5 +#define PROPM_END_CENTEROUTEMISSION 0 +#define PROPM_START_GLOWINDARKEMISSIONOPTIONS 0 +#define PROP_ENABLEGITDEMISSION 0 +#define PROP_GITDEWORLDORMESH 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER 0 +#define PROP_GITDEMINLIGHT 0 +#define PROP_GITDEMAXLIGHT 1 +#define PROPM_END_GLOWINDARKEMISSIONOPTIONS 0 +#define PROPM_START_BLINKINGEMISSIONOPTIONS 0 +#define PROP_EMISSIONBLINKINGENABLED 0 +#define PROP_EMISSIVEBLINK_MIN 0 +#define PROP_EMISSIVEBLINK_MAX 1 +#define PROP_EMISSIVEBLINK_VELOCITY 4 +#define PROP_EMISSIONBLINKINGOFFSET 0 +#define PROPM_END_BLINKINGEMISSIONOPTIONS 0 +#define PROPM_START_SCROLLINGEMISSIONOPTIONS 0 +#define PROP_SCROLLINGEMISSION 0 +#define PROP_EMISSIONSCROLLINGUSECURVE 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR 0 +#define PROP_EMISSIVESCROLL_WIDTH 10 +#define PROP_EMISSIVESCROLL_VELOCITY 10 +#define PROP_EMISSIVESCROLL_INTERVAL 20 +#define PROP_EMISSIONSCROLLINGOFFSET 0 +#define PROPM_END_SCROLLINGEMISSIONOPTIONS 0 +#define PROPM_START_EMISSIONAUDIOLINK 0 +#define PROP_ENABLEEMISSIONSTRENGTHAUDIOLINK 0 +#define PROP_AUDIOLINKEMISSIONSTRENGTHBAND 0 +#define PROP_ENABLEEMISSIONCENTEROUTAUDIOLINK 0 +#define PROP_EMISSIONCENTEROUTAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSIONCENTEROUTBAND 0 +#define PROP_EMISSIONCENTEROUTADDAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSIONCENTEROUTADDBAND 0 +#define PROP_AUDIOLINKADDEMISSIONBAND 0 +#define PROPM_END_EMISSIONAUDIOLINK 0 +#define PROPM_END_EMISSIONOPTIONS 0 +#define PROPM_START_EMISSION1OPTIONS 0 +#define PROP_ENABLEEMISSION1 0 +#define PROP_EMISSIONBASECOLORASMAP1 0 +#define PROP_EMISSIONMAP1UV 0 +#define PROP_EMISSIONMASK1UV 0 +#define PROP_EMISSIONSTRENGTH1 0 +#define PROP_EMISSIONHUESHIFTENABLED1 0 +#define PROP_EMISSIONHUESHIFT1 0 +#define PROP_EMISSIONHUESHIFTSPEED1 0 +#define PROPM_START_CENTEROUTEMISSION1 0 +#define PROP_EMISSIONCENTEROUTENABLED1 0 +#define PROP_EMISSIONCENTEROUTSPEED1 5 +#define PROPM_END_CENTEROUTEMISSION1 0 +#define PROPM_START_GLOWINDARKEMISSIONOPTIONS1 0 +#define PROP_ENABLEGITDEMISSION1 0 +#define PROP_GITDEWORLDORMESH1 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER1 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER1 0 +#define PROP_GITDEMINLIGHT1 0 +#define PROP_GITDEMAXLIGHT1 1 +#define PROPM_END_GLOWINDARKEMISSIONOPTIONS1 0 +#define PROPM_START_BLINKINGEMISSIONOPTIONS1 0 +#define PROP_EMISSIONBLINKINGENABLED1 0 +#define PROP_EMISSIVEBLINK_MIN1 0 +#define PROP_EMISSIVEBLINK_MAX1 1 +#define PROP_EMISSIVEBLINK_VELOCITY1 4 +#define PROP_EMISSIONBLINKINGOFFSET1 0 +#define PROPM_END_BLINKINGEMISSIONOPTIONS1 0 +#define PROPM_START_SCROLLINGEMISSIONOPTIONS1 0 +#define PROP_SCROLLINGEMISSION1 0 +#define PROP_EMISSIONSCROLLINGUSECURVE1 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR1 0 +#define PROP_EMISSIVESCROLL_WIDTH1 10 +#define PROP_EMISSIVESCROLL_VELOCITY1 10 +#define PROP_EMISSIVESCROLL_INTERVAL1 20 +#define PROP_EMISSIONSCROLLINGOFFSET1 0 +#define PROPM_END_SCROLLINGEMISSION1OPTIONS 0 +#define PROPM_START_EMISSION1AUDIOLINK 0 +#define PROP_ENABLEEMISSION1STRENGTHAUDIOLINK 0 +#define PROP_AUDIOLINKEMISSION1STRENGTHBAND 0 +#define PROP_ENABLEEMISSION1CENTEROUTAUDIOLINK 0 +#define PROP_EMISSION1CENTEROUTAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTBAND 0 +#define PROP_EMISSION1CENTEROUTADDAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTADDBAND 0 +#define PROP_AUDIOLINKADDEMISSION1BAND 0 +#define PROPM_END_EMISSION1AUDIOLINK 0 +#define PROPM_END_EMISSION1OPTIONS 0 +#define PROPM_START_FLIPBOOK 0 +#define PROP_ENABLEFLIPBOOK 0 +#define PROP_FLIPBOOKALPHACONTROLSFINALALPHA 0 +#define PROP_FLIPBOOKINTENSITYCONTROLSALPHA 0 +#define PROP_FLIPBOOKCOLORREPLACES 0 +#define PROP_FLIPBOOKTEXARRAYUV 0 +#define PROP_FLIPBOOKMASKUV 0 +#define PROP_FLIPBOOKTOTALFRAMES 1 +#define PROP_FLIPBOOKFPS 30 +#define PROP_FLIPBOOKTILED 0 +#define PROP_FLIPBOOKEMISSIONSTRENGTH 0 +#define PROP_FLIPBOOKROTATION 0 +#define PROP_FLIPBOOKROTATIONSPEED 0 +#define PROP_FLIPBOOKREPLACE 1 +#define PROP_FLIPBOOKMULTIPLY 0 +#define PROP_FLIPBOOKADD 0 +#define PROPM_START_FLIPBOOKAUDIOLINK 0 +#define PROP_AUDIOLINKFLIPBOOKSCALEBAND 0 +#define PROP_AUDIOLINKFLIPBOOKALPHABAND 0 +#define PROP_AUDIOLINKFLIPBOOKEMISSIONBAND 0 +#define PROP_AUDIOLINKFLIPBOOKFRAMEBAND 0 +#define PROPM_END_FLIPBOOKAUDIOLINK 0 +#define PROPM_START_MANUALFLIPBOOKCONTROL 0 +#define PROP_FLIPBOOKCURRENTFRAME -1 +#define PROPM_END_MANUALFLIPBOOKCONTROL 0 +#define PROPM_START_CROSSFADE 0 +#define PROP_FLIPBOOKCROSSFADEENABLED 0 +#define PROPM_END_CROSSFADE 0 +#define PROPM_START_FLIPBOOKHUESHIFT 0 +#define PROP_FLIPBOOKHUESHIFTENABLED 0 +#define PROP_FLIPBOOKHUESHIFTSPEED 0 +#define PROP_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOK 0 +#define PROPM_START_DISSOLVE 0 +#define PROP_ENABLEDISSOLVE 0 +#define PROP_DISSOLVETYPE 1 +#define PROP_DISSOLVEEDGEWIDTH 0.025 +#define PROP_DISSOLVEEDGEHARDNESS 0.5 +#define PROP_DISSOLVEEDGEEMISSION 0 +#define PROP_DISSOLVETOTEXTUREUV 0 +#define PROP_DISSOLVETOEMISSIONSTRENGTH 0 +#define PROP_DISSOLVENOISETEXTUREUV 0 +#define PROP_DISSOLVEINVERTNOISE 0 +#define PROP_DISSOLVEDETAILNOISEUV 0 +#define PROP_DISSOLVEINVERTDETAILNOISE 0 +#define PROP_DISSOLVEDETAILSTRENGTH 0.1 +#define PROP_DISSOLVEALPHA 0 +#define PROP_DISSOLVEUSEVERTEXCOLORS 0 +#define PROP_DISSOLVEMASKUV 0 +#define PROP_DISSOLVEMASKINVERT 0 +#define PROP_CONTINUOUSDISSOLVE 0 +#define PROPM_START_DISSOLVEMASKING 0 +#define PROP_DISSOLVEEMISSIONSIDE 2 +#define PROP_DISSOLVEEMISSION1SIDE 2 +#define PROPM_END_DISSOLVEMASKING 0 +#define PROPM_START_POINTTOPOINT 0 +#define PROP_DISSOLVEP2PWORLDLOCAL 0 +#define PROP_DISSOLVEP2PEDGELENGTH 0.1 +#define PROPM_END_POINTTOPOINT 0 +#define PROPM_START_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEHUESHIFTENABLED 0 +#define PROP_DISSOLVEHUESHIFTSPEED 0 +#define PROP_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEEDGEHUESHIFTENABLED 0 +#define PROP_DISSOLVEEDGEHUESHIFTSPEED 0 +#define PROP_DISSOLVEEDGEHUESHIFT 0 +#define PROPM_END_DISSOLVEHUESHIFT 0 +#define PROPM_START_BONUSSLIDERS 0 +#define PROP_DISSOLVEALPHA0 0 +#define PROP_DISSOLVEALPHA1 0 +#define PROP_DISSOLVEALPHA2 0 +#define PROP_DISSOLVEALPHA3 0 +#define PROP_DISSOLVEALPHA4 0 +#define PROP_DISSOLVEALPHA5 0 +#define PROP_DISSOLVEALPHA6 0 +#define PROP_DISSOLVEALPHA7 0 +#define PROP_DISSOLVEALPHA8 0 +#define PROP_DISSOLVEALPHA9 0 +#define PROPM_END_BONUSSLIDERS 0 +#define PROPM_START_DISSOLVEAUDIOLINK 0 +#define PROP_ENABLEDISSOLVEAUDIOLINK 0 +#define PROP_AUDIOLINKDISSOLVEALPHABAND 0 +#define PROP_AUDIOLINKDISSOLVEDETAILBAND 0 +#define PROPM_END_DISSOLVEAUDIOLINK 0 +#define PROPM_END_DISSOLVE 0 +#define PROPM_START_PANOSPHEREOPTIONS 0 +#define PROP_PANOTOGGLE 0 +#define PROP_PANOINFINITESTEREOTOGGLE 0 +#define PROP_PANOMASKUV 0 +#define PROP_PANOEMISSION 0 +#define PROP_PANOBLEND 0 +#define PROP_PANOCUBEMAPTOGGLE 0 +#define PROPM_END_PANOSPHEREOPTIONS 0 +#define PROPM_START_GLITTER 0 +#define PROP_GLITTERENABLE 0 +#define PROP_GLITTERMODE 0 +#define PROP_GLITTERSHAPE 0 +#define PROP_GLITTERBLENDTYPE 0 +#define PROP_GLITTERUSESURFACECOLOR 0 +#define PROP_GLITTERCOLORMAPUV 0 +#define PROP_GLITTERMASKUV 0 +#define PROP_GLITTERTEXTUREROTATION 0 +#define PROP_GLITTERFREQUENCY 300 +#define PROP_GLITTERJITTER 1 +#define PROP_GLITTERSPEED 10 +#define PROP_GLITTERSIZE 0.3 +#define PROP_GLITTERCONTRAST 300 +#define PROP_GLITTERANGLERANGE 90 +#define PROP_GLITTERMINBRIGHTNESS 0 +#define PROP_GLITTERBRIGHTNESS 3 +#define PROP_GLITTERBIAS 0.8 +#define PROP_GLITTERHIDEINSHADOW 0 +#define PROP_GLITTERCENTERSIZE 0.08 +#define PROP_GLITTERFREQUENCYLINEAREMISSIVE 20 +#define PROP_GLITTERJAGGYFIX 0 +#define PROPM_START_GLITTERHUESHIFT 0 +#define PROP_GLITTERHUESHIFTENABLED 0 +#define PROP_GLITTERHUESHIFTSPEED 0 +#define PROP_GLITTERHUESHIFT 0 +#define PROPM_END_GLITTERHUESHIFT 0 +#define PROPM_START_GLITTERRANDOM 0 +#define PROP_GLITTERRANDOMCOLORS 0 +#define PROP_GLITTERRANDOMSIZE 0 +#define PROP_GLITTERRANDOMROTATION 0 +#define PROPM_END_GLITTERRANDOM 0 +#define PROPM_END_GLITTER 0 +#define PROPM_START_TEXT 0 +#define PROP_TEXTPIXELRANGE 4 +#define PROP_TEXTENABLED 0 +#define PROPM_START_TEXTFPS 0 +#define PROP_TEXTFPSENABLED 0 +#define PROP_TEXTFPSUV 0 +#define PROP_TEXTFPSEMISSIONSTRENGTH 0 +#define PROP_TEXTFPSROTATION 0 +#define PROPM_END_TEXTFPS 0 +#define PROPM_START_TEXTPOSITION 0 +#define PROP_TEXTPOSITIONENABLED 0 +#define PROP_TEXTPOSITIONUV 0 +#define PROP_TEXTPOSITIONEMISSIONSTRENGTH 0 +#define PROP_TEXTPOSITIONROTATION 0 +#define PROPM_END_TEXTPOSITION 0 +#define PROPM_START_TEXTINSTANCETIME 0 +#define PROP_TEXTTIMEENABLED 0 +#define PROP_TEXTTIMEUV 0 +#define PROP_TEXTTIMEEMISSIONSTRENGTH 0 +#define PROP_TEXTTIMEROTATION 0 +#define PROPM_END_TEXTINSTANCETIME 0 +#define PROPM_END_TEXT 0 +#define PROPM_START_MIRROROPTIONS 0 +#define PROP_ENABLEMIRROROPTIONS 0 +#define PROP_MIRROR 0 +#define PROP_ENABLEMIRRORTEXTURE 0 +#define PROP_MIRRORTEXTUREUV 0 +#define PROPM_END_MIRROROPTIONS 0 +#define PROPM_START_DISTANCEFADE 0 +#define PROP_MAINMINALPHA 0 +#define PROP_MAINFADETEXTUREUV 0 +#define PROPM_END_DISTANCEFADE 0 +#define PROPM_START_ANGULARFADE 0 +#define PROP_ENABLERANDOM 0 +#define PROP_ANGLETYPE 0 +#define PROP_ANGLECOMPARETO 0 +#define PROP_CAMERAANGLEMIN 45 +#define PROP_CAMERAANGLEMAX 90 +#define PROP_MODELANGLEMIN 45 +#define PROP_MODELANGLEMAX 90 +#define PROP_ANGLEMINALPHA 0 +#define PROPM_END_ANGULARFADE 0 +#define PROPM_START_DISTORTIONFLOW 0 +#define PROP_ENABLEDISTORTION 0 +#define PROP_DISTORTIONMASKUV 0 +#define PROP_DISTORTIONSTRENGTH 0.5 +#define PROP_DISTORTIONSTRENGTH1 0.5 +#define PROPM_END_DISTORTIONFLOW 0 +#define PROPM_START_AUDIOLINK 0 +#define PROP_ENABLEAUDIOLINK 0 +#define PROP_AUDIOLINKHELP 0 +#define PROP_AUDIOLINKDELAY 0 +#define PROP_AUDIOLINKAVERAGING 0 +#define PROP_AUDIOLINKAVERAGERANGE 0.5 +#define PROPM_START_AUDIOLINKDEBUG 0 +#define PROP_ENABLEAUDIOLINKDEBUG 0 +#define PROP_AUDIOLINKDEBUGTREBLE 0 +#define PROP_AUDIOLINKDEBUGHIGHMID 0 +#define PROP_AUDIOLINKDEBUGLOWMID 0 +#define PROP_AUDIOLINKDEBUGBASS 0 +#define PROP_AUDIOLINKDEBUGANIMATE 0 +#define PROP_AUDIOLINKTEXTUREVISUALIZATION 0 +#define PROPM_END_AUDIOLINKDEBUG 0 +#define PROPM_END_AUDIOLINK 0 +#define PROPM_PATREON 0 +#define PROPM_START_VIDEO 0 +#define PROP_ENABLEVIDEO 0 +#define PROP_VIDEOUVNUMBER 0 +#define PROP_VIDEOTYPE 3 +#define PROP_VIDEOBACKLIGHT 1 +#define PROP_VIDEOEMISSIONENABLED 1 +#define PROPM_START_VIDEOSETTINGS 0 +#define PROP_VIDEOENABLEVIDEOPLAYER 0 +#define PROP_VIDEOPIXELATETORESOLUTION 0 +#define PROP_VIDEOREPEATVIDEOTEXTURE 0 +#define PROP_VIDEOSATURATION 0 +#define PROP_VIDEOCONTRAST 0 +#define PROPM_END_VIDEOSETTINGS 0 +#define PROPM_START_VIDEODEBUG 0 +#define PROP_VIDEOENABLEDEBUG 0 +#define PROPM_END_VIDEODEBUG 0 +#define PROPM_START_CRT 0 +#define PROP_VIDEOCRTREFRESHRATE 24 +#define PROP_VIDEOCRTPIXELENERGIZEDTIME 1.9 +#define PROPM_END_CRT 0 +#define PROPM_START_GAMEBOY 0 +#define PROPM_END_GAMEBOY 0 +#define PROPM_END_VIDEO 0 +#define PROPM_START_TOUCHOPTIONS 0 +#define PROPM_START_BULGE 0 +#define PROP_ENABLEBULGE 0 +#define PROP_BULDGEFADELENGTH 0.02 +#define PROP_BULDGEHEIGHT 0.02 +#define PROPM_END_BULGE 0 +#define PROPM_START_TOUCHGLOW 0 +#define PROP_ENABLETOUCHGLOW 0 +#define PROP_DEPTHGRADIENTTEXTUREUV 0 +#define PROP_DEPTHGRADIENTBLEND 0 +#define PROP_DEPTHGRADIENTUV 0 +#define PROP_DEPTHMASKUV 0 +#define PROP_DEPTHGLOWEMISSION 3 +#define PROP_FADELENGTH 20 +#define PROP_DEPTHALPHAMIN 1 +#define PROP_DEPTHALPHAMAX 1 +#define PROPM_END_TOUCHGLOW 0 +#define PROPM_END_TOUCHOPTIONS 0 +#define PROPM_START_HOLOGRAM 0 +#define PROP_ENABLEHOLO 0 +#define PROP_HOLOCOORDINATESPACE 0 +#define PROP_HOLOLINEDENSITY 10 +#define PROP_HOLOSCROLLSPEED 1 +#define PROPM_START_FRESNELALPHA 0 +#define PROP_HOLOFRESNELALPHA 0 +#define PROP_HOLORIMSHARPNESS 0.5 +#define PROP_HOLORIMWIDTH 0.5 +#define PROPM_END_FRESNELALPHA 0 +#define PROPM_END_HOLOGRAM 0 +#define PROPM_START_GRABPASS 0 +#define PROP_COMMENTIFZERO_ENABLEGRABPASS 0 +#define PROP_GRABPASSUSEALPHA 1 +#define PROP_GRABPASSBLENDMAPUV 0 +#define PROP_GRABPASSBLENDFACTOR 1 +#define PROP_GRABSRCBLEND 2 +#define PROP_GRABDSTBLEND 0 +#define PROPM_START_REFRACTION 0 +#define PROP_REFRACTIONENABLED 0 +#define PROP_REFRACTIONINDEX 1.333333 +#define PROP_REFRACTIONCHROMATICABERATTION 0 +#define PROPM_END_REFRACTION 0 +#define PROPM_START_BLUR 0 +#define PROP_ENABLEBLUR 0 +#define PROP_GRABBLURDISTANCE 0 +#define PROP_GRABBLURQUALITY 2 +#define PROP_GRABBLURDIRECTIONS 4 +#define PROPM_END_BLUR 0 +#define PROPM_END_GRABPASS 0 +#define PROPM_START_IRIDESCENCE 0 +#define PROP_ENABLEIRIDESCENCE 0 +#define PROP_IRIDESCENCENORMALTOGGLE 0 +#define PROP_IRIDESCENCENORMALINTENSITY 1 +#define PROP_IRIDESCENCENORMALUV 0 +#define PROP_IRIDESCENCEMASKUV 0 +#define PROP_IRIDESCENCENORMALSELECTION 1 +#define PROP_IRIDESCENCEINTENSITY 1 +#define PROP_IRIDESCENCEADDBLEND 0 +#define PROP_IRIDESCENCEREPLACEBLEND 0 +#define PROP_IRIDESCENCEMULTIPLYBLEND 0 +#define PROP_IRIDESCENCEEMISSIONSTRENGTH 0 +#define PROP_IRIDESCENCETIME 0 +#define PROPM_END_IRIDESCENCE 0 +#define PROPM_START_VERTEXGLITCH 0 +#define PROP_ENABLEVERTEXGLITCH 0 +#define PROP_VERTEXGLITCHFREQUENCY 0 +#define PROP_VERTEXGLITCHTHRESHOLD 1 +#define PROP_VERTEXGLITCHSTRENGTH 1 +#define PROPM_END_VERTEXGLITCH 0 +#define PROPM_START_SPAWNS 0 +#define PROPM_START_SCIFISPAWNIN 0 +#define PROP_ENABLESCIFISPAWNIN 0 +#define PROP_SPAWNINNOISEINTENSITY 0.35 +#define PROP_SPAWNINALPHA 0 +#define PROP_SPAWNINEMISSIONOFFSET 0.1 +#define PROP_SPAWNINVERTOFFSET 10 +#define PROP_SPAWNINVERTOFFSETOFFSET 0.1 +#define PROPM_END_SCIFISPAWNIN 0 +#define PROPM_END_SPAWNS 0 +#define PROPM_START_VORONOI 0 +#define PROP_VORONOITYPE 1 +#define PROP_VORONOISPACE 0 +#define PROP_VORONOIBLEND 0 +#define PROP_ENABLEVORONOI 0 +#define PROP_VORONOIEFFECTSMATERIALALPHA 0 +#define PROP_VORONOIMASKUV 0 +#define PROP_VORONOINOISEUV 0 +#define PROP_VORONOINOISEINTENSITY 0.1 +#define PROP_VORONOIEMISSION0 0 +#define PROP_VORONOIEMISSION1 0 +#define PROP_VORONOISCALE 5 +#define PROPM_START_VORONOIRANDOM 0 +#define PROP_VORONOIENABLERANDOMCELLCOLOR 0 +#define PROPM_END_VORONOIRANDOM 0 +#define PROPM_END_VORONOI 0 +#define PROPM_START_BLACKLIGHT 0 +#define PROP_BLACKLIGHTMASKENABLED 0 +#define PROP_BLACKLIGHTMASKDEBUG 0 +#define PROP_BLACKLIGHTMASKMETALLIC 4 +#define PROP_BLACKLIGHTMASKCLEARCOAT 4 +#define PROP_BLACKLIGHTMASKMATCAP 4 +#define PROP_BLACKLIGHTMASKMATCAP2 4 +#define PROP_BLACKLIGHTMASKEMISSION 4 +#define PROP_BLACKLIGHTMASKEMISSION2 4 +#define PROP_BLACKLIGHTMASKFLIPBOOK 4 +#define PROP_BLACKLIGHTMASKDISSOLVE 4 +#define PROP_BLACKLIGHTMASKPANOSPHERE 4 +#define PROP_BLACKLIGHTMASKGLITTER 4 +#define PROP_BLACKLIGHTMASKIRIDESCENCE 4 +#define PROPM_END_BLACKLIGHT 0 +#define PROPM_OUTLINEOPTIONS 0 +#define PROP_COMMENTIFZERO_ENABLEOUTLINEPASS 0 +#define PROP_OUTLINEMODE 0 +#define PROP_OUTLINETINTMIX 0 +#define PROP_OUTLINERIMLIGHTBLEND 0 +#define PROP_OUTLINEFIXEDSIZE 0 +#define PROP_OUTLINESMAXDISTANCE 9999 +#define PROP_OUTLINEUSEVERTEXCOLORS 0 +#define PROP_OUTLINELIT 1 +#define PROP_LINEWIDTH 0 +#define PROP_OUTLINEEMISSION 0 +#define PROP_OUTLINETEXTUREUV 0 +#define PROP_OUTLINEMASKUV 0 +#define PROP_OUTLINESHADOWSTRENGTH 1 +#define PROPM_START_OUTLINEADVANCED 0 +#define PROP_OUTLINECULL 1 +#define PROP_OUTLINEOFFSETFACTOR 0 +#define PROP_OUTLINEOFFSETUNITS 0 +#define PROPM_END_OUTLINEADVANCED 0 +#define PROPM_PARALLAXMAP 0 +#define PROP_PARALLAXMAP 0 +#define PROP_PARALLAXHEIGHTMAPENABLED 0 +#define PROP_PARALLAXINTERNALMAPENABLED 0 +#define PROPM_START_PARALLAXHEIGHTMAP 0 +#define PROP_PARALLAXUV 0 +#define PROP_PARALLAXHEIGHTMAPMASKUV 0 +#define PROP_PARALLAXSTRENGTH 0 +#define PROPM_END_PARALLAXHEIGHTMAP 0 +#define PROPM_START_PARALLAXINTERNAL 0 +#define PROP_PARALLAXINTERNALHEIGHTMAPMODE 0 +#define PROP_PARALLAXINTERNALHEIGHTFROMALPHA 0 +#define PROP_PARALLAXINTERNALMAPMASKUV 0 +#define PROP_PARALLAXINTERNALITERATIONS 1 +#define PROP_PARALLAXINTERNALMINDEPTH 0 +#define PROP_PARALLAXINTERNALMAXDEPTH 1 +#define PROP_PARALLAXINTERNALMINFADE 0 +#define PROP_PARALLAXINTERNALMAXFADE 1 +#define PROPM_END_PARALLAXINTERNAL 0 +#define PROPM_START_PARALLAXADVANCED 0 +#define PROP_PARALLAXBIAS 0.42 +#define PROPM_END_PARALLAXADVANCED 0 +#define PROPM_THIRDPARTY 1 +#define PROPM_START_RALIV 1 +#define PROP_RALIVHELP 0 +#define PROPM_START_RALIVPENETRATOR 1 +#define PROP_PENETRATORENABLED 1 +#define PROP_SQUEEZE 0.032 +#define PROP_SQUEEZEDIST 0.0259 +#define PROP_BULGEOFFSET 0.158 +#define PROP_BULGEPOWER 0.00127 +#define PROP_LENGTH 0.12 +#define PROP_ENTRANCESTIFFNESS 0.01 +#define PROP_CURVATURE 0.324 +#define PROP_RECURVATURE -0.145 +#define PROP_WRIGGLESPEED 6.2 +#define PROP_WRIGGLE 0 +#define PROP__DIRTY 1 +#define PROPM_END_RALIVPENETRATOR 0 +#define PROPM_START_RALIVORIFACE 0 +#define PROP_ORIFACEENABLED 0 +#define PROP_ENTRYOPENDURATION 0.1 +#define PROP_SHAPE1DEPTH 0.1 +#define PROP_SHAPE1DURATION 0.1 +#define PROP_SHAPE2DEPTH 0.2 +#define PROP_SHAPE2DURATION 0.1 +#define PROP_SHAPE3DEPTH 0.3 +#define PROP_SHAPE3DURATION 0.1 +#define PROP_BLENDSHAPEPOWER 1 +#define PROP_BLENDSHAPEBADSCALEFIX 1 +#define PROPM_END_RALIVORIFACE 0 +#define PROPM_START_RALIVADVANCED 0 +#define PROP_RALIVADVANCEDHELP 0 +#define PROP_ORIFICECHANNEL 0 +#define PROPM_END_RALIVADVANCED 0 +#define PROPM_END_RALIV 0 +#define PROPM_RENDERINGOPTIONS 0 +#define PROP_CULL 2 +#define PROP_ZTEST 4 +#define PROP_ZWRITE 1 +#define PROP_COLORMASK 15 +#define PROP_OFFSETFACTOR 0 +#define PROP_OFFSETUNITS 0 +#define PROP_IGNOREFOG 0 +#define PROPINSTANCING 0 +#define PROPM_START_BLENDING 0 +#define PROP_BLENDOP 0 +#define PROP_BLENDOPALPHA 0 +#define PROP_SRCBLEND 1 +#define PROP_DSTBLEND 0 +#define PROPM_END_BLENDING 0 +#define PROPM_START_STENCILPASSOPTIONS 0 +#define PROP_STENCILREF 0 +#define PROP_STENCILREADMASK 255 +#define PROP_STENCILWRITEMASK 255 +#define PROP_STENCILPASSOP 0 +#define PROP_STENCILFAILOP 0 +#define PROP_STENCILZFAILOP 0 +#define PROP_STENCILCOMPAREFUNCTION 8 +#define PROPM_END_STENCILPASSOPTIONS 0 +#define PROPM_START_OUTLINESTENCIL 0 +#define PROP_OUTLINESTENCILREF 0 +#define PROP_OUTLINESTENCILREADMASK 255 +#define PROP_OUTLINESTENCILWRITEMASK 255 +#define PROP_OUTLINESTENCILPASSOP 0 +#define PROP_OUTLINESTENCILFAILOP 0 +#define PROP_OUTLINESTENCILZFAILOP 0 +#define PROP_OUTLINESTENCILCOMPAREFUNCTION 8 +#define PROPM_END_OUTLINESTENCIL 0 +#define PROPM_START_DEBUGOPTIONS 0 +#define PROP_DEBUGENABLED 0 +#define PROP_VERTEXUNWRAP 0 +#define PROP_DEBUGMESHDATA 0 +#define PROP_DEBUGLIGHTINGDATA 0 +#define PROP_DEBUGCAMERADATA 0 +#define PROPM_END_DEBUGOPTIONS 0 + + + #pragma target 5.0 + #define POI_SHADOW + float _Mode; + // UV Distortion +// #pragma shader_feature USER_LUT + // Vertex Offsets +// #pragma shader_feature AUTO_EXPOSURE + // Flipbook +// #pragma shader_feature _SUNDISK_HIGH_QUALITY + // Mirror +// #pragma shader_feature _REQUIRE_UV2 + // Random +// #pragma shader_feature _SUNDISK_NONE + // Dissolve +// #pragma shader_feature DISTORT + #pragma multi_compile_instancing + #pragma vertex vertShadowCaster + #pragma fragment fragShadowCaster + #include "../Includes/CGI_PoiPassShadow.cginc" + ENDCG + + } + //LightingCastShadows + + Pass + { + Tags { "LightMode" = "Meta" } + Cull Off + CGPROGRAM +#define OPTIMIZER_ENABLED +#define VIGNETTE_MASKED +#define _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A +#define PROPSHADER_IS_USING_THRY_EDITOR 69 +#define PROPSHADER_MASTER_LABEL 0 +#define PROPSHADER_PRESETS 0 +#define PROPSHADER_PROPERTIES_LABEL_FILE 0 +#define PROPFOOTER_YOUTUBE 0 +#define PROPFOOTER_TWITTER 0 +#define PROPFOOTER_PATREON 0 +#define PROPFOOTER_DISCORD 0 +#define PROPFOOTER_GITHUB 0 +#define PROP_FORGOTTOLOCKMATERIAL 1 +#define PROP_SHADEROPTIMIZERENABLED 1 +#define PROP_LOCKTOOLTIP 0 +#define PROP_MODE 0 +#define PROPM_MAINOPTIONS 1 +#define PROP_MAINTEX +#define PROP_MAINTEXTUREUV 0 +#define PROP_MAINEMISSIONSTRENGTH 0 +#define PROP_BUMPMAPUV 0 +#define PROP_BUMPSCALE 1 +#define PROP_CLIPPINGMASKUV 0 +#define PROP_INVERSE_CLIPPING 0 +#define PROPM_START_MAINHUESHIFT 0 +#define PROP_MAINCOLORADJUSTTEXTUREUV 0 +#define PROP_MAINHUESHIFTREPLACE 0 +#define PROP_MAINHUESHIFT 0 +#define PROP_MAINHUESHIFTSPEED 0 +#define PROP_SATURATION 0 +#define PROP_MAINBRIGHTNESS 0 +#define PROP_MAINHUESHIFTTOGGLE 0 +#define PROPM_END_MAINHUESHIFT 0 +#define PROPM_START_RGBMASK 0 +#define PROP_RGBMASKENABLED 0 +#define PROP_RGBUSEVERTEXCOLORS 0 +#define PROP_RGBBLENDMULTIPLICATIVE 0 +#define PROP_RGBMASKUV 0 +#define PROP_RGBRED_UV 0 +#define PROP_RGBGREEN_UV 0 +#define PROP_RGBBLUE_UV 0 +#define PROP_RGBNORMALSENABLED 0 +#define PROP_RGBNORMALBLEND 0 +#define PROP_RGBNORMALRUV 0 +#define PROP_RGBNORMALRSCALE 0 +#define PROP_RGBNORMALGUV 0 +#define PROP_RGBNORMALGSCALE 0 +#define PROP_RGBNORMALBUV 0 +#define PROP_RGBNORMALBSCALE 0 +#define PROPM_END_RGBMASK 0 +#define PROPM_START_DETAILOPTIONS 0 +#define PROP_DETAILENABLED 0 +#define PROP_DETAILMASKUV 0 +#define PROP_DETAILTEXUV 0 +#define PROP_DETAILTEXINTENSITY 1 +#define PROP_DETAILBRIGHTNESS 1 +#define PROP_DETAILNORMALMAPSCALE 1 +#define PROP_DETAILNORMALMAPUV 0 +#define PROPM_END_DETAILOPTIONS 0 +#define PROPM_START_MAINVERTEXCOLORS 0 +#define PROP_MAINVERTEXCOLORING 0 +#define PROP_MAINUSEVERTEXCOLORALPHA 0 +#define PROPM_END_MAINVERTEXCOLORS 0 +#define PROPM_START_VERTEXMANIPULATION 0 +#define PROP_VERTEXMANIPULATIONSENABLED 0 +#define PROP_VERTEXMANIPULATIONHEIGHT 0 +#define PROP_VERTEXMANIPULATIONHEIGHTUV 0 +#define PROP_VERTEXMANIPULATIONHEIGHTBIAS 0 +#define PROP_VERTEXROUNDINGENABLED 0 +#define PROP_VERTEXROUNDINGDIVISION 500 +#define PROPM_END_VERTEXMANIPULATION 0 +#define PROPM_START_ALPHA 0 +#define PROP_CUTOFF 0.5 +#define PROP_DITHERINGENABLED 0 +#define PROP_DITHERGRADIENT 0.1 +#define PROP_FORCEOPAQUE 0 +#define PROP_MAINSHADOWCLIPMOD 0 +#define PROP_ALPHATOMASK 0 +#define PROP_MAINALPHATOCOVERAGE 0 +#define PROP_MAINMIPSCALE 0.25 +#define PROP_ALPHAPREMULTIPLY 0 +#define PROP_ALPHAMOD 0 +#define PROPM_END_ALPHA 0 +#define PROPM_START_DECALSECTION 0 +#define PROP_DECALMASKUV 0 +#define PROPM_START_DECAL0 0 +#define PROP_DECALENABLED 0 +#define PROP_DECALEMISSIONSTRENGTH 0 +#define PROP_DECALTEXTUREUV 0 +#define PROP_DECALTILED 0 +#define PROP_DECAL0DEPTH 0 +#define PROP_DECALROTATION 0 +#define PROP_DECALROTATIONSPEED 0 +#define PROP_DECALBLENDTYPE 0 +#define PROP_DECALBLENDALPHA 1 +#define PROP_DECALHUESHIFTENABLED 0 +#define PROP_DECALHUESHIFTSPEED 0 +#define PROP_DECALHUESHIFT 0 +#define PROPM_START_DECAL0AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL0SCALEBAND 0 +#define PROP_AUDIOLINKDECAL0ALPHABAND 0 +#define PROP_AUDIOLINKDECAL0EMISSIONBAND 0 +#define PROPM_END_DECAL0AUDIOLINK 0 +#define PROPM_END_DECAL0 0 +#define PROPM_START_DECAL1 0 +#define PROP_DECALENABLED1 0 +#define PROP_DECALEMISSIONSTRENGTH1 0 +#define PROP_DECALTEXTURE1UV 0 +#define PROP_DECALTILED1 0 +#define PROP_DECAL1DEPTH 0 +#define PROP_DECALROTATION1 0 +#define PROP_DECALROTATIONSPEED1 0 +#define PROP_DECALBLENDTYPE1 0 +#define PROP_DECALBLENDALPHA1 1 +#define PROP_DECALHUESHIFTENABLED1 0 +#define PROP_DECALHUESHIFTSPEED1 0 +#define PROP_DECALHUESHIFT1 0 +#define PROPM_START_DECAL1AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL1SCALEBAND 0 +#define PROP_AUDIOLINKDECAL1ALPHABAND 0 +#define PROP_AUDIOLINKDECAL1EMISSIONBAND 0 +#define PROPM_END_DECAL1AUDIOLINK 0 +#define PROPM_END_DECAL1 0 +#define PROPM_START_DECAL2 0 +#define PROP_DECALENABLED2 0 +#define PROP_DECALEMISSIONSTRENGTH2 0 +#define PROP_DECALTEXTURE2UV 0 +#define PROP_DECALTILED2 0 +#define PROP_DECAL2DEPTH 0 +#define PROP_DECALROTATION2 0 +#define PROP_DECALROTATIONSPEED2 0 +#define PROP_DECALBLENDTYPE2 0 +#define PROP_DECALBLENDALPHA2 1 +#define PROP_DECALHUESHIFTENABLED2 0 +#define PROP_DECALHUESHIFTSPEED2 0 +#define PROP_DECALHUESHIFT2 0 +#define PROPM_START_DECAL2AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL2SCALEBAND 0 +#define PROP_AUDIOLINKDECAL2ALPHABAND 0 +#define PROP_AUDIOLINKDECAL2EMISSIONBAND 0 +#define PROPM_END_DECAL2AUDIOLINK 0 +#define PROPM_END_DECAL2 0 +#define PROPM_START_DECAL3 0 +#define PROP_DECALENABLED3 0 +#define PROP_DECALEMISSIONSTRENGTH3 0 +#define PROP_DECALTEXTURE3UV 0 +#define PROP_DECALTILED3 0 +#define PROP_DECAL3DEPTH 0 +#define PROP_DECALROTATION3 0 +#define PROP_DECALROTATIONSPEED3 0 +#define PROP_DECALBLENDTYPE3 0 +#define PROP_DECALBLENDALPHA3 1 +#define PROP_DECALHUESHIFTENABLED3 0 +#define PROP_DECALHUESHIFTSPEED3 0 +#define PROP_DECALHUESHIFT3 0 +#define PROPM_START_DECAL3AUDIOLINK 0 +#define PROP_AUDIOLINKDECAL3SCALEBAND 0 +#define PROP_AUDIOLINKDECAL3ALPHABAND 0 +#define PROP_AUDIOLINKDECAL3EMISSIONBAND 0 +#define PROPM_END_DECAL3AUDIOLINK 0 +#define PROPM_END_DECAL3 0 +#define PROPM_END_DECALSECTION 0 +#define PROPM_START_BACKFACE 0 +#define PROP_BACKFACEENABLED 0 +#define PROP_BACKFACETEXTUREUV 0 +#define PROP_BACKFACEDETAILINTENSITY 1 +#define PROP_BACKFACEHUESHIFT 0 +#define PROP_BACKFACEEMISSIONSTRENGTH 0 +#define PROPM_END_BACKFACE 0 +#define PROPM_LIGHTINGOPTIONS 1 +#define PROPM_START_LIGHTING 1 +#define PROP_ENABLELIGHTING 1 +#define PROP_LIGHTINGMODE 4 +#define PROP_LIGHTINGSTANDARDSMOOTHNESS 0 +#define PROP_LIGHTINGWRAPPEDWRAP 0 +#define PROP_LIGHTINGWRAPPEDNORMALIZATION 0 +#define PROP_LIGHTINGRAMPTYPE 0 +#define PROP_1ST_SHADEMAPUV 0 +#define PROP_USE_1STSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_1STSHADEMAPMASK_INVERSE 0 +#define PROP_USE_BASEAS1ST 0 +#define PROP_2ND_SHADEMAPUV 0 +#define PROP_USE_2NDSHADEMAPALPHA_AS_SHADOWMASK 0 +#define PROP_2NDSHADEMAPMASK_INVERSE 0 +#define PROP_USE_1STAS2ND 0 +#define PROP_BASECOLOR_STEP 0.5 +#define PROP_BASESHADE_FEATHER 0.0001 +#define PROP_SHADECOLOR_STEP 0 +#define PROP_1ST2ND_SHADES_FEATHER 0.0001 +#define PROP_TOONRAMP +#define PROP_LIGHTINGSHADOWMASKUV 0 +#define PROP_SHADOWOFFSET 0 +#define PROP_LIGHTINGGRADIENTSTART 0 +#define PROP_LIGHTINGGRADIENTEND 0.5 +#define PROP_SSSSCALE 1 +#define PROP_SSSBUMPBLUR 0.7 +#define PROP_SHADOWSTRENGTH 0 +#define PROP_ATTENUATIONMULTIPLIER 0 +#define PROP_LIGHTINGIGNOREAMBIENTCOLOR 0 +#define PROPM_START_LIGHTINGMODIFIERS 0 +#define PROP_LIGHTINGDIRECTCOLORMODE 0 +#define PROP_LIGHTINGINDIRECTCOLORMODE 0 +#define PROP_LIGHTINGUNCAPPED 0 +#define PROP_LIGHTINGONLYUNITYSHADOWS 0 +#define PROP_LIGHTINGMONOCHROMATIC 0 +#define PROP_LIGHTINGMINLIGHTBRIGHTNESS 0 +#define PROP_LIGHTINGMINSHADOWBRIGHTNESSRATIO 0 +#define PROPM_END_LIGHTINGMODIFIERS 0 +#define PROPM_START_DETAILSHADOWS 0 +#define PROP_LIGHTINGDETAILSHADOWSENABLED 0 +#define PROP_LIGHTINGDETAILSHADOWSUV 0 +#define PROP_LIGHTINGDETAILSTRENGTH 1 +#define PROPM_END_DETAILSHADOWS 0 +#define PROPM_START_AMBIENTOCCLUSION 0 +#define PROP_LIGHTINGENABLEAO 0 +#define PROP_LIGHTINGAOTEXUV 0 +#define PROP_AOSTRENGTH 1 +#define PROPM_END_AMBIENTOCCLUSION 0 +#define PROPM_START_LIGHTINGHSL 0 +#define PROP_LIGHTINGENABLEHSL 0 +#define PROP_LIGHTINGHSLINTENSITY 1 +#define PROP_LIGHTINGSHADOWHUE 0.5 +#define PROP_LIGHTINGSHADOWSATURATION 0.5 +#define PROP_LIGHTINGSHADOWLIGHTNESS 0.5 +#define PROPM_END_LIGHTINGHSL 0 +#define PROPM_START_LIGHTINGADVANCED 0 +#define PROP_COMMENTIFZERO_LIGHTINGADDITIVEENABLE 1 +#define PROP_LIGHTINGADDITIVETYPE 1 +#define PROP_LIGHTINGADDITIVEGRADIENTSTART 0 +#define PROP_LIGHTINGADDITIVEGRADIENTEND 0.5 +#define PROP_LIGHTINGADDITIVEPASSTHROUGH 0.5 +#define PROP_LIGHTINGADDITIVEDETAILSTRENGTH 1 +#define PROP_LIGHTINGADDITIVELIMITINTENSITY 0 +#define PROP_LIGHTINGADDITIVEMAXINTENSITY 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROP_DISABLEDIRECTIONALINADD 1 +#define PROPM_END_LIGHTINGADVANCED 0 +#define PROPM_END_LIGHTING 0 +#define PROPM_START_SUBSURFACE 0 +#define PROP_ENABLESSS 0 +#define PROP_SSSTHICKNESSMAPUV 0 +#define PROP_SSSTHICKNESSMOD 0 +#define PROP_SSSSCALE 0.25 +#define PROP_SSSPOWER 5 +#define PROP_SSSDISTORTION 1 +#define PROPM_END_SUBSURFACE 0 +#define PROPM_START_RIMLIGHTOPTIONS 0 +#define PROP_ENABLERIMLIGHTING 0 +#define PROP_RIMLIGHTNORMAL 1 +#define PROP_RIMLIGHTINGINVERT 0 +#define PROP_RIMWIDTH 0.8 +#define PROP_RIMSHARPNESS 0.1 +#define PROP_RIMSTRENGTH 0 +#define PROP_RIMBRIGHTEN 0 +#define PROP_RIMLIGHTCOLORBIAS 1 +#define PROP_RIMTEXUV 0 +#define PROP_RIMMASKUV 0 +#define PROPM_START_RIMHUESHIFT 0 +#define PROP_RIMHUESHIFTENABLED 0 +#define PROP_RIMHUESHIFTSPEED 0 +#define PROP_RIMHUESHIFT 0 +#define PROPM_END_RIMHUESHIFT 0 +#define PROPM_START_RIMWIDTHNOISE 0 +#define PROP_RIMWIDTHNOISETEXTUREUV 0 +#define PROP_RIMWIDTHNOISESTRENGTH 0.1 +#define PROPM_END_RIMWIDTHNOISE 0 +#define PROPM_START_SHADOWMIX 0 +#define PROP_SHADOWMIX 0 +#define PROP_SHADOWMIXTHRESHOLD 0.5 +#define PROP_SHADOWMIXWIDTHMOD 0.5 +#define PROPM_END_SHADOWMIX 0 +#define PROPM_END_RIMLIGHTOPTIONS 0 +#define PROPM_START_REFLECTIONRIM 0 +#define PROP_ENABLEENVIRONMENTALRIM 0 +#define PROP_RIMENVIROMASKUV 0 +#define PROP_RIMENVIROBLUR 0.7 +#define PROP_RIMENVIROWIDTH 0.45 +#define PROP_RIMENVIROSHARPNESS 0 +#define PROP_RIMENVIROMINBRIGHTNESS 0 +#define PROP_RIMENVIROINTENSITY 1 +#define PROPM_END_REFLECTIONRIM 0 +#define PROPM_START_BAKEDLIGHTING 0 +#define PROP_SPECULARLMOCCLUSION 0 +#define PROP_SPECLMOCCLUSIONADJUST 0.2 +#define PROP_GIEMISSIONMULTIPLIER 1 +#define PROPDSGI 0 +#define PROPLIGHTMAPFLAGS 0 +#define PROPM_END_BAKEDLIGHTING 0 +#define PROP_LOCKTOOLTIP 0 +#define PROPM_START_BRDF 0 +#define PROP_ENABLEBRDF 0 +#define PROP_BRDFMETALLICGLOSSMAPTOOLTIP 0 +#define PROP_BRDFINVERTGLOSSINESS 0 +#define PROP_BRDFMETALLICGLOSSMAPUV 0 +#define PROP_BRDFSPECULARMAPTOOLTIP 0 +#define PROP_BRDFSPECULARMAPUV 0 +#define PROP_BRDFMETALLICMAPTOOLTIP 0 +#define PROP_BRDFMETALLICMAPUV 0 +#define PROP_BRDFMETALLIC 0 +#define PROP_BRDFGLOSSINESS 0 +#define PROP_BRDFREFLECTANCE 0.5 +#define PROP_BRDFANISOTROPY 0 +#define PROP_BRDFREFLECTIONSENABLED 1 +#define PROP_BRDFSPECULARENABLED 1 +#define PROP_BRDFFALLBACK +#define PROP_BRDFFORCEFALLBACK 0 +#define PROPM_END_BRDF 0 +#define PROPM_START_METALLIC 0 +#define PROP_ENABLEMETALLIC 0 +#define PROP_CUBEMAP +#define PROP_SAMPLEWORLD 0 +#define PROP_METALLICTINTMAPUV 0 +#define PROP_METALLICMASKUV 0 +#define PROP_METALLIC 0 +#define PROP_SMOOTHNESSMASKUV 0 +#define PROP_INVERTSMOOTHNESS 0 +#define PROP_SMOOTHNESS 0 +#define PROPM_END_METALLIC 0 +#define PROPM_START_CLEARCOAT 0 +#define PROP_ENABLECLEARCOAT 0 +#define PROP_CLEARCOATHELPBOX 0 +#define PROP_CLEARCOATMAPUV 0 +#define PROP_CLEARCOATINVERTSMOOTHNESS 0 +#define PROP_CLEARCOAT 1 +#define PROP_CLEARCOATGLOSSINESS 0 +#define PROP_CLEARCOATANISOTROPY 0 +#define PROP_CLEARCOATENABLEREFLECTIONS 1 +#define PROP_CLEARCOATENABLESPECULAR 1 +#define PROP_CLEARCOATFORCEFALLBACK 0 +#define PROPM_END_CLEARCOAT 0 +#define PROPM_START_MATCAP 0 +#define PROP_MATCAPENABLE 0 +#define PROP_MATCAPBORDER 0.43 +#define PROP_MATCAPMASKUV 0 +#define PROP_MATCAPMASKINVERT 0 +#define PROP_MATCAPEMISSIONSTRENGTH 0 +#define PROP_MATCAPINTENSITY 1 +#define PROP_MATCAPLIGHTMASK 0 +#define PROP_MATCAPREPLACE 1 +#define PROP_MATCAPMULTIPLY 0 +#define PROP_MATCAPADD 0 +#define PROP_MATCAPNORMAL 1 +#define PROPM_START_MATCAPHUESHIFT 0 +#define PROP_MATCAPHUESHIFTENABLED 0 +#define PROP_MATCAPHUESHIFTSPEED 0 +#define PROP_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAPHUESHIFT 0 +#define PROPM_END_MATCAP 0 +#define PROPM_START_MATCAP2 0 +#define PROP_MATCAP2ENABLE 0 +#define PROP_MATCAP2BORDER 0.43 +#define PROP_MATCAP2MASKUV 0 +#define PROP_MATCAP2MASKINVERT 0 +#define PROP_MATCAP2EMISSIONSTRENGTH 0 +#define PROP_MATCAP2INTENSITY 1 +#define PROP_MATCAP2LIGHTMASK 0 +#define PROP_MATCAP2REPLACE 0 +#define PROP_MATCAP2MULTIPLY 0 +#define PROP_MATCAP2ADD 0 +#define PROP_MATCAP2NORMAL 1 +#define PROPM_START_MATCAP2HUESHIFT 0 +#define PROP_MATCAP2HUESHIFTENABLED 0 +#define PROP_MATCAP2HUESHIFTSPEED 0 +#define PROP_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2HUESHIFT 0 +#define PROPM_END_MATCAP2 0 +#define PROPM_START_SPECULAR 0 +#define PROP_ENABLESPECULAR 0 +#define PROP_SPECULARTYPE 1 +#define PROP_SPECULARNORMAL 1 +#define PROP_SPECULARMETALLIC 0 +#define PROP_SPECULARMETALLICMAPUV 0 +#define PROP_SPECULARSMOOTHNESS 1 +#define PROP_SPECULARMAPUV 0 +#define PROP_SPECULARINVERTSMOOTHNESS 0 +#define PROP_SPECULARMASKUV 0 +#define PROP_SMOOTHNESSFROM 1 +#define PROP_SPECWHATTANGENT 0 +#define PROP_ANISOSPEC1ALPHA 1 +#define PROP_ANISOSPEC2ALPHA 1 +#define PROP_SPEC1OFFSET 0 +#define PROP_SPEC2SMOOTHNESS 0 +#define PROP_ANISOUSETANGENTMAP 0 +#define PROP_ANISOTANGENTMAPUV 0 +#define PROP_SPECULARTOONSTART 0.95 +#define PROP_SPECULARTOONEND 1 +#define PROP_SPECULARANISOJITTERMIRRORED 0 +#define PROP_SPECULARANISOJITTERMICROMULTIPLIER 0 +#define PROP_SPECULARANISOJITTERMICROUV 0 +#define PROP_SPECULARANISOJITTERMACROMULTIPLIER 0 +#define PROP_SPECULARANISOJITTERMACROUV 0 +#define PROPM_END_SPECULAR 0 +#define PROPM_START_SPECULAR1 0 +#define PROP_ENABLESPECULAR1 0 +#define PROP_SPECULARTYPE1 1 +#define PROP_SPECULARNORMAL1 1 +#define PROP_SPECULARMETALLIC1 0 +#define PROP_SPECULARMETALLICMAP1UV 0 +#define PROP_SPECULARSMOOTHNESS1 0.75 +#define PROP_SPECULARMAP1UV 0 +#define PROP_SPECULARINVERTSMOOTHNESS1 0 +#define PROP_SPECULARMASK1UV 0 +#define PROP_SMOOTHNESSFROM1 1 +#define PROP_SPECWHATTANGENT1 0 +#define PROP_ANISOSPEC1ALPHA1 1 +#define PROP_ANISOSPEC2ALPHA1 1 +#define PROP_SPEC1OFFSET1 0 +#define PROP_SPEC2SMOOTHNESS1 0 +#define PROP_ANISOUSETANGENTMAP1 0 +#define PROP_ANISOTANGENTMAP1UV 0 +#define PROP_SPECULARTOONSTART1 0.95 +#define PROP_SPECULARTOONEND1 1 +#define PROP_SPECULARANISOJITTERMIRRORED1 0 +#define PROP_SPECULARANISOJITTERMICROMULTIPLIER1 0 +#define PROP_SPECULARANISOJITTERMICRO1UV 0 +#define PROP_SPECULARANISOJITTERMACROMULTIPLIER1 0 +#define PROP_SPECULARANISOJITTERMACRO1UV 0 +#define PROPM_END_SPECULAR1 0 +#define PROPM_SPECIAL_EFFECTS 0 +#define PROPM_START_EMISSIONOPTIONS 0 +#define PROP_ENABLEEMISSION 0 +#define PROP_EMISSIONREPLACE 0 +#define PROP_EMISSIONBASECOLORASMAP 0 +#define PROP_EMISSIONMAPUV 0 +#define PROP_EMISSIONMASKUV 0 +#define PROP_EMISSIONSTRENGTH 0 +#define PROP_EMISSIONHUESHIFTENABLED 0 +#define PROP_EMISSIONHUESHIFT 0 +#define PROP_EMISSIONHUESHIFTSPEED 0 +#define PROPM_START_CENTEROUTEMISSION 0 +#define PROP_EMISSIONCENTEROUTENABLED 0 +#define PROP_EMISSIONCENTEROUTSPEED 5 +#define PROPM_END_CENTEROUTEMISSION 0 +#define PROPM_START_GLOWINDARKEMISSIONOPTIONS 0 +#define PROP_ENABLEGITDEMISSION 0 +#define PROP_GITDEWORLDORMESH 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER 0 +#define PROP_GITDEMINLIGHT 0 +#define PROP_GITDEMAXLIGHT 1 +#define PROPM_END_GLOWINDARKEMISSIONOPTIONS 0 +#define PROPM_START_BLINKINGEMISSIONOPTIONS 0 +#define PROP_EMISSIONBLINKINGENABLED 0 +#define PROP_EMISSIVEBLINK_MIN 0 +#define PROP_EMISSIVEBLINK_MAX 1 +#define PROP_EMISSIVEBLINK_VELOCITY 4 +#define PROP_EMISSIONBLINKINGOFFSET 0 +#define PROPM_END_BLINKINGEMISSIONOPTIONS 0 +#define PROPM_START_SCROLLINGEMISSIONOPTIONS 0 +#define PROP_SCROLLINGEMISSION 0 +#define PROP_EMISSIONSCROLLINGUSECURVE 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR 0 +#define PROP_EMISSIVESCROLL_WIDTH 10 +#define PROP_EMISSIVESCROLL_VELOCITY 10 +#define PROP_EMISSIVESCROLL_INTERVAL 20 +#define PROP_EMISSIONSCROLLINGOFFSET 0 +#define PROPM_END_SCROLLINGEMISSIONOPTIONS 0 +#define PROPM_START_EMISSIONAUDIOLINK 0 +#define PROP_ENABLEEMISSIONSTRENGTHAUDIOLINK 0 +#define PROP_AUDIOLINKEMISSIONSTRENGTHBAND 0 +#define PROP_ENABLEEMISSIONCENTEROUTAUDIOLINK 0 +#define PROP_EMISSIONCENTEROUTAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSIONCENTEROUTBAND 0 +#define PROP_EMISSIONCENTEROUTADDAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSIONCENTEROUTADDBAND 0 +#define PROP_AUDIOLINKADDEMISSIONBAND 0 +#define PROPM_END_EMISSIONAUDIOLINK 0 +#define PROPM_END_EMISSIONOPTIONS 0 +#define PROPM_START_EMISSION1OPTIONS 0 +#define PROP_ENABLEEMISSION1 0 +#define PROP_EMISSIONBASECOLORASMAP1 0 +#define PROP_EMISSIONMAP1UV 0 +#define PROP_EMISSIONMASK1UV 0 +#define PROP_EMISSIONSTRENGTH1 0 +#define PROP_EMISSIONHUESHIFTENABLED1 0 +#define PROP_EMISSIONHUESHIFT1 0 +#define PROP_EMISSIONHUESHIFTSPEED1 0 +#define PROPM_START_CENTEROUTEMISSION1 0 +#define PROP_EMISSIONCENTEROUTENABLED1 0 +#define PROP_EMISSIONCENTEROUTSPEED1 5 +#define PROPM_END_CENTEROUTEMISSION1 0 +#define PROPM_START_GLOWINDARKEMISSIONOPTIONS1 0 +#define PROP_ENABLEGITDEMISSION1 0 +#define PROP_GITDEWORLDORMESH1 0 +#define PROP_GITDEMINEMISSIONMULTIPLIER1 1 +#define PROP_GITDEMAXEMISSIONMULTIPLIER1 0 +#define PROP_GITDEMINLIGHT1 0 +#define PROP_GITDEMAXLIGHT1 1 +#define PROPM_END_GLOWINDARKEMISSIONOPTIONS1 0 +#define PROPM_START_BLINKINGEMISSIONOPTIONS1 0 +#define PROP_EMISSIONBLINKINGENABLED1 0 +#define PROP_EMISSIVEBLINK_MIN1 0 +#define PROP_EMISSIVEBLINK_MAX1 1 +#define PROP_EMISSIVEBLINK_VELOCITY1 4 +#define PROP_EMISSIONBLINKINGOFFSET1 0 +#define PROPM_END_BLINKINGEMISSIONOPTIONS1 0 +#define PROPM_START_SCROLLINGEMISSIONOPTIONS1 0 +#define PROP_SCROLLINGEMISSION1 0 +#define PROP_EMISSIONSCROLLINGUSECURVE1 0 +#define PROP_EMISSIONSCROLLINGVERTEXCOLOR1 0 +#define PROP_EMISSIVESCROLL_WIDTH1 10 +#define PROP_EMISSIVESCROLL_VELOCITY1 10 +#define PROP_EMISSIVESCROLL_INTERVAL1 20 +#define PROP_EMISSIONSCROLLINGOFFSET1 0 +#define PROPM_END_SCROLLINGEMISSION1OPTIONS 0 +#define PROPM_START_EMISSION1AUDIOLINK 0 +#define PROP_ENABLEEMISSION1STRENGTHAUDIOLINK 0 +#define PROP_AUDIOLINKEMISSION1STRENGTHBAND 0 +#define PROP_ENABLEEMISSION1CENTEROUTAUDIOLINK 0 +#define PROP_EMISSION1CENTEROUTAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTBAND 0 +#define PROP_EMISSION1CENTEROUTADDAUDIOLINKWIDTH 1 +#define PROP_AUDIOLINKEMISSION1CENTEROUTADDBAND 0 +#define PROP_AUDIOLINKADDEMISSION1BAND 0 +#define PROPM_END_EMISSION1AUDIOLINK 0 +#define PROPM_END_EMISSION1OPTIONS 0 +#define PROPM_START_FLIPBOOK 0 +#define PROP_ENABLEFLIPBOOK 0 +#define PROP_FLIPBOOKALPHACONTROLSFINALALPHA 0 +#define PROP_FLIPBOOKINTENSITYCONTROLSALPHA 0 +#define PROP_FLIPBOOKCOLORREPLACES 0 +#define PROP_FLIPBOOKTEXARRAYUV 0 +#define PROP_FLIPBOOKMASKUV 0 +#define PROP_FLIPBOOKTOTALFRAMES 1 +#define PROP_FLIPBOOKFPS 30 +#define PROP_FLIPBOOKTILED 0 +#define PROP_FLIPBOOKEMISSIONSTRENGTH 0 +#define PROP_FLIPBOOKROTATION 0 +#define PROP_FLIPBOOKROTATIONSPEED 0 +#define PROP_FLIPBOOKREPLACE 1 +#define PROP_FLIPBOOKMULTIPLY 0 +#define PROP_FLIPBOOKADD 0 +#define PROPM_START_FLIPBOOKAUDIOLINK 0 +#define PROP_AUDIOLINKFLIPBOOKSCALEBAND 0 +#define PROP_AUDIOLINKFLIPBOOKALPHABAND 0 +#define PROP_AUDIOLINKFLIPBOOKEMISSIONBAND 0 +#define PROP_AUDIOLINKFLIPBOOKFRAMEBAND 0 +#define PROPM_END_FLIPBOOKAUDIOLINK 0 +#define PROPM_START_MANUALFLIPBOOKCONTROL 0 +#define PROP_FLIPBOOKCURRENTFRAME -1 +#define PROPM_END_MANUALFLIPBOOKCONTROL 0 +#define PROPM_START_CROSSFADE 0 +#define PROP_FLIPBOOKCROSSFADEENABLED 0 +#define PROPM_END_CROSSFADE 0 +#define PROPM_START_FLIPBOOKHUESHIFT 0 +#define PROP_FLIPBOOKHUESHIFTENABLED 0 +#define PROP_FLIPBOOKHUESHIFTSPEED 0 +#define PROP_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOKHUESHIFT 0 +#define PROPM_END_FLIPBOOK 0 +#define PROPM_START_DISSOLVE 0 +#define PROP_ENABLEDISSOLVE 0 +#define PROP_DISSOLVETYPE 1 +#define PROP_DISSOLVEEDGEWIDTH 0.025 +#define PROP_DISSOLVEEDGEHARDNESS 0.5 +#define PROP_DISSOLVEEDGEEMISSION 0 +#define PROP_DISSOLVETOTEXTUREUV 0 +#define PROP_DISSOLVETOEMISSIONSTRENGTH 0 +#define PROP_DISSOLVENOISETEXTUREUV 0 +#define PROP_DISSOLVEINVERTNOISE 0 +#define PROP_DISSOLVEDETAILNOISEUV 0 +#define PROP_DISSOLVEINVERTDETAILNOISE 0 +#define PROP_DISSOLVEDETAILSTRENGTH 0.1 +#define PROP_DISSOLVEALPHA 0 +#define PROP_DISSOLVEUSEVERTEXCOLORS 0 +#define PROP_DISSOLVEMASKUV 0 +#define PROP_DISSOLVEMASKINVERT 0 +#define PROP_CONTINUOUSDISSOLVE 0 +#define PROPM_START_DISSOLVEMASKING 0 +#define PROP_DISSOLVEEMISSIONSIDE 2 +#define PROP_DISSOLVEEMISSION1SIDE 2 +#define PROPM_END_DISSOLVEMASKING 0 +#define PROPM_START_POINTTOPOINT 0 +#define PROP_DISSOLVEP2PWORLDLOCAL 0 +#define PROP_DISSOLVEP2PEDGELENGTH 0.1 +#define PROPM_END_POINTTOPOINT 0 +#define PROPM_START_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEHUESHIFTENABLED 0 +#define PROP_DISSOLVEHUESHIFTSPEED 0 +#define PROP_DISSOLVEHUESHIFT 0 +#define PROP_DISSOLVEEDGEHUESHIFTENABLED 0 +#define PROP_DISSOLVEEDGEHUESHIFTSPEED 0 +#define PROP_DISSOLVEEDGEHUESHIFT 0 +#define PROPM_END_DISSOLVEHUESHIFT 0 +#define PROPM_START_BONUSSLIDERS 0 +#define PROP_DISSOLVEALPHA0 0 +#define PROP_DISSOLVEALPHA1 0 +#define PROP_DISSOLVEALPHA2 0 +#define PROP_DISSOLVEALPHA3 0 +#define PROP_DISSOLVEALPHA4 0 +#define PROP_DISSOLVEALPHA5 0 +#define PROP_DISSOLVEALPHA6 0 +#define PROP_DISSOLVEALPHA7 0 +#define PROP_DISSOLVEALPHA8 0 +#define PROP_DISSOLVEALPHA9 0 +#define PROPM_END_BONUSSLIDERS 0 +#define PROPM_START_DISSOLVEAUDIOLINK 0 +#define PROP_ENABLEDISSOLVEAUDIOLINK 0 +#define PROP_AUDIOLINKDISSOLVEALPHABAND 0 +#define PROP_AUDIOLINKDISSOLVEDETAILBAND 0 +#define PROPM_END_DISSOLVEAUDIOLINK 0 +#define PROPM_END_DISSOLVE 0 +#define PROPM_START_PANOSPHEREOPTIONS 0 +#define PROP_PANOTOGGLE 0 +#define PROP_PANOINFINITESTEREOTOGGLE 0 +#define PROP_PANOMASKUV 0 +#define PROP_PANOEMISSION 0 +#define PROP_PANOBLEND 0 +#define PROP_PANOCUBEMAPTOGGLE 0 +#define PROPM_END_PANOSPHEREOPTIONS 0 +#define PROPM_START_GLITTER 0 +#define PROP_GLITTERENABLE 0 +#define PROP_GLITTERMODE 0 +#define PROP_GLITTERSHAPE 0 +#define PROP_GLITTERBLENDTYPE 0 +#define PROP_GLITTERUSESURFACECOLOR 0 +#define PROP_GLITTERCOLORMAPUV 0 +#define PROP_GLITTERMASKUV 0 +#define PROP_GLITTERTEXTUREROTATION 0 +#define PROP_GLITTERFREQUENCY 300 +#define PROP_GLITTERJITTER 1 +#define PROP_GLITTERSPEED 10 +#define PROP_GLITTERSIZE 0.3 +#define PROP_GLITTERCONTRAST 300 +#define PROP_GLITTERANGLERANGE 90 +#define PROP_GLITTERMINBRIGHTNESS 0 +#define PROP_GLITTERBRIGHTNESS 3 +#define PROP_GLITTERBIAS 0.8 +#define PROP_GLITTERHIDEINSHADOW 0 +#define PROP_GLITTERCENTERSIZE 0.08 +#define PROP_GLITTERFREQUENCYLINEAREMISSIVE 20 +#define PROP_GLITTERJAGGYFIX 0 +#define PROPM_START_GLITTERHUESHIFT 0 +#define PROP_GLITTERHUESHIFTENABLED 0 +#define PROP_GLITTERHUESHIFTSPEED 0 +#define PROP_GLITTERHUESHIFT 0 +#define PROPM_END_GLITTERHUESHIFT 0 +#define PROPM_START_GLITTERRANDOM 0 +#define PROP_GLITTERRANDOMCOLORS 0 +#define PROP_GLITTERRANDOMSIZE 0 +#define PROP_GLITTERRANDOMROTATION 0 +#define PROPM_END_GLITTERRANDOM 0 +#define PROPM_END_GLITTER 0 +#define PROPM_START_TEXT 0 +#define PROP_TEXTPIXELRANGE 4 +#define PROP_TEXTENABLED 0 +#define PROPM_START_TEXTFPS 0 +#define PROP_TEXTFPSENABLED 0 +#define PROP_TEXTFPSUV 0 +#define PROP_TEXTFPSEMISSIONSTRENGTH 0 +#define PROP_TEXTFPSROTATION 0 +#define PROPM_END_TEXTFPS 0 +#define PROPM_START_TEXTPOSITION 0 +#define PROP_TEXTPOSITIONENABLED 0 +#define PROP_TEXTPOSITIONUV 0 +#define PROP_TEXTPOSITIONEMISSIONSTRENGTH 0 +#define PROP_TEXTPOSITIONROTATION 0 +#define PROPM_END_TEXTPOSITION 0 +#define PROPM_START_TEXTINSTANCETIME 0 +#define PROP_TEXTTIMEENABLED 0 +#define PROP_TEXTTIMEUV 0 +#define PROP_TEXTTIMEEMISSIONSTRENGTH 0 +#define PROP_TEXTTIMEROTATION 0 +#define PROPM_END_TEXTINSTANCETIME 0 +#define PROPM_END_TEXT 0 +#define PROPM_START_MIRROROPTIONS 0 +#define PROP_ENABLEMIRROROPTIONS 0 +#define PROP_MIRROR 0 +#define PROP_ENABLEMIRRORTEXTURE 0 +#define PROP_MIRRORTEXTUREUV 0 +#define PROPM_END_MIRROROPTIONS 0 +#define PROPM_START_DISTANCEFADE 0 +#define PROP_MAINMINALPHA 0 +#define PROP_MAINFADETEXTUREUV 0 +#define PROPM_END_DISTANCEFADE 0 +#define PROPM_START_ANGULARFADE 0 +#define PROP_ENABLERANDOM 0 +#define PROP_ANGLETYPE 0 +#define PROP_ANGLECOMPARETO 0 +#define PROP_CAMERAANGLEMIN 45 +#define PROP_CAMERAANGLEMAX 90 +#define PROP_MODELANGLEMIN 45 +#define PROP_MODELANGLEMAX 90 +#define PROP_ANGLEMINALPHA 0 +#define PROPM_END_ANGULARFADE 0 +#define PROPM_START_DISTORTIONFLOW 0 +#define PROP_ENABLEDISTORTION 0 +#define PROP_DISTORTIONMASKUV 0 +#define PROP_DISTORTIONSTRENGTH 0.5 +#define PROP_DISTORTIONSTRENGTH1 0.5 +#define PROPM_END_DISTORTIONFLOW 0 +#define PROPM_START_AUDIOLINK 0 +#define PROP_ENABLEAUDIOLINK 0 +#define PROP_AUDIOLINKHELP 0 +#define PROP_AUDIOLINKDELAY 0 +#define PROP_AUDIOLINKAVERAGING 0 +#define PROP_AUDIOLINKAVERAGERANGE 0.5 +#define PROPM_START_AUDIOLINKDEBUG 0 +#define PROP_ENABLEAUDIOLINKDEBUG 0 +#define PROP_AUDIOLINKDEBUGTREBLE 0 +#define PROP_AUDIOLINKDEBUGHIGHMID 0 +#define PROP_AUDIOLINKDEBUGLOWMID 0 +#define PROP_AUDIOLINKDEBUGBASS 0 +#define PROP_AUDIOLINKDEBUGANIMATE 0 +#define PROP_AUDIOLINKTEXTUREVISUALIZATION 0 +#define PROPM_END_AUDIOLINKDEBUG 0 +#define PROPM_END_AUDIOLINK 0 +#define PROPM_PATREON 0 +#define PROPM_START_VIDEO 0 +#define PROP_ENABLEVIDEO 0 +#define PROP_VIDEOUVNUMBER 0 +#define PROP_VIDEOTYPE 3 +#define PROP_VIDEOBACKLIGHT 1 +#define PROP_VIDEOEMISSIONENABLED 1 +#define PROPM_START_VIDEOSETTINGS 0 +#define PROP_VIDEOENABLEVIDEOPLAYER 0 +#define PROP_VIDEOPIXELATETORESOLUTION 0 +#define PROP_VIDEOREPEATVIDEOTEXTURE 0 +#define PROP_VIDEOSATURATION 0 +#define PROP_VIDEOCONTRAST 0 +#define PROPM_END_VIDEOSETTINGS 0 +#define PROPM_START_VIDEODEBUG 0 +#define PROP_VIDEOENABLEDEBUG 0 +#define PROPM_END_VIDEODEBUG 0 +#define PROPM_START_CRT 0 +#define PROP_VIDEOCRTREFRESHRATE 24 +#define PROP_VIDEOCRTPIXELENERGIZEDTIME 1.9 +#define PROPM_END_CRT 0 +#define PROPM_START_GAMEBOY 0 +#define PROPM_END_GAMEBOY 0 +#define PROPM_END_VIDEO 0 +#define PROPM_START_TOUCHOPTIONS 0 +#define PROPM_START_BULGE 0 +#define PROP_ENABLEBULGE 0 +#define PROP_BULDGEFADELENGTH 0.02 +#define PROP_BULDGEHEIGHT 0.02 +#define PROPM_END_BULGE 0 +#define PROPM_START_TOUCHGLOW 0 +#define PROP_ENABLETOUCHGLOW 0 +#define PROP_DEPTHGRADIENTTEXTUREUV 0 +#define PROP_DEPTHGRADIENTBLEND 0 +#define PROP_DEPTHGRADIENTUV 0 +#define PROP_DEPTHMASKUV 0 +#define PROP_DEPTHGLOWEMISSION 3 +#define PROP_FADELENGTH 20 +#define PROP_DEPTHALPHAMIN 1 +#define PROP_DEPTHALPHAMAX 1 +#define PROPM_END_TOUCHGLOW 0 +#define PROPM_END_TOUCHOPTIONS 0 +#define PROPM_START_HOLOGRAM 0 +#define PROP_ENABLEHOLO 0 +#define PROP_HOLOCOORDINATESPACE 0 +#define PROP_HOLOLINEDENSITY 10 +#define PROP_HOLOSCROLLSPEED 1 +#define PROPM_START_FRESNELALPHA 0 +#define PROP_HOLOFRESNELALPHA 0 +#define PROP_HOLORIMSHARPNESS 0.5 +#define PROP_HOLORIMWIDTH 0.5 +#define PROPM_END_FRESNELALPHA 0 +#define PROPM_END_HOLOGRAM 0 +#define PROPM_START_GRABPASS 0 +#define PROP_COMMENTIFZERO_ENABLEGRABPASS 0 +#define PROP_GRABPASSUSEALPHA 1 +#define PROP_GRABPASSBLENDMAPUV 0 +#define PROP_GRABPASSBLENDFACTOR 1 +#define PROP_GRABSRCBLEND 2 +#define PROP_GRABDSTBLEND 0 +#define PROPM_START_REFRACTION 0 +#define PROP_REFRACTIONENABLED 0 +#define PROP_REFRACTIONINDEX 1.333333 +#define PROP_REFRACTIONCHROMATICABERATTION 0 +#define PROPM_END_REFRACTION 0 +#define PROPM_START_BLUR 0 +#define PROP_ENABLEBLUR 0 +#define PROP_GRABBLURDISTANCE 0 +#define PROP_GRABBLURQUALITY 2 +#define PROP_GRABBLURDIRECTIONS 4 +#define PROPM_END_BLUR 0 +#define PROPM_END_GRABPASS 0 +#define PROPM_START_IRIDESCENCE 0 +#define PROP_ENABLEIRIDESCENCE 0 +#define PROP_IRIDESCENCENORMALTOGGLE 0 +#define PROP_IRIDESCENCENORMALINTENSITY 1 +#define PROP_IRIDESCENCENORMALUV 0 +#define PROP_IRIDESCENCEMASKUV 0 +#define PROP_IRIDESCENCENORMALSELECTION 1 +#define PROP_IRIDESCENCEINTENSITY 1 +#define PROP_IRIDESCENCEADDBLEND 0 +#define PROP_IRIDESCENCEREPLACEBLEND 0 +#define PROP_IRIDESCENCEMULTIPLYBLEND 0 +#define PROP_IRIDESCENCEEMISSIONSTRENGTH 0 +#define PROP_IRIDESCENCETIME 0 +#define PROPM_END_IRIDESCENCE 0 +#define PROPM_START_VERTEXGLITCH 0 +#define PROP_ENABLEVERTEXGLITCH 0 +#define PROP_VERTEXGLITCHFREQUENCY 0 +#define PROP_VERTEXGLITCHTHRESHOLD 1 +#define PROP_VERTEXGLITCHSTRENGTH 1 +#define PROPM_END_VERTEXGLITCH 0 +#define PROPM_START_SPAWNS 0 +#define PROPM_START_SCIFISPAWNIN 0 +#define PROP_ENABLESCIFISPAWNIN 0 +#define PROP_SPAWNINNOISEINTENSITY 0.35 +#define PROP_SPAWNINALPHA 0 +#define PROP_SPAWNINEMISSIONOFFSET 0.1 +#define PROP_SPAWNINVERTOFFSET 10 +#define PROP_SPAWNINVERTOFFSETOFFSET 0.1 +#define PROPM_END_SCIFISPAWNIN 0 +#define PROPM_END_SPAWNS 0 +#define PROPM_START_VORONOI 0 +#define PROP_VORONOITYPE 1 +#define PROP_VORONOISPACE 0 +#define PROP_VORONOIBLEND 0 +#define PROP_ENABLEVORONOI 0 +#define PROP_VORONOIEFFECTSMATERIALALPHA 0 +#define PROP_VORONOIMASKUV 0 +#define PROP_VORONOINOISEUV 0 +#define PROP_VORONOINOISEINTENSITY 0.1 +#define PROP_VORONOIEMISSION0 0 +#define PROP_VORONOIEMISSION1 0 +#define PROP_VORONOISCALE 5 +#define PROPM_START_VORONOIRANDOM 0 +#define PROP_VORONOIENABLERANDOMCELLCOLOR 0 +#define PROPM_END_VORONOIRANDOM 0 +#define PROPM_END_VORONOI 0 +#define PROPM_START_BLACKLIGHT 0 +#define PROP_BLACKLIGHTMASKENABLED 0 +#define PROP_BLACKLIGHTMASKDEBUG 0 +#define PROP_BLACKLIGHTMASKMETALLIC 4 +#define PROP_BLACKLIGHTMASKCLEARCOAT 4 +#define PROP_BLACKLIGHTMASKMATCAP 4 +#define PROP_BLACKLIGHTMASKMATCAP2 4 +#define PROP_BLACKLIGHTMASKEMISSION 4 +#define PROP_BLACKLIGHTMASKEMISSION2 4 +#define PROP_BLACKLIGHTMASKFLIPBOOK 4 +#define PROP_BLACKLIGHTMASKDISSOLVE 4 +#define PROP_BLACKLIGHTMASKPANOSPHERE 4 +#define PROP_BLACKLIGHTMASKGLITTER 4 +#define PROP_BLACKLIGHTMASKIRIDESCENCE 4 +#define PROPM_END_BLACKLIGHT 0 +#define PROPM_OUTLINEOPTIONS 0 +#define PROP_COMMENTIFZERO_ENABLEOUTLINEPASS 0 +#define PROP_OUTLINEMODE 0 +#define PROP_OUTLINETINTMIX 0 +#define PROP_OUTLINERIMLIGHTBLEND 0 +#define PROP_OUTLINEFIXEDSIZE 0 +#define PROP_OUTLINESMAXDISTANCE 9999 +#define PROP_OUTLINEUSEVERTEXCOLORS 0 +#define PROP_OUTLINELIT 1 +#define PROP_LINEWIDTH 0 +#define PROP_OUTLINEEMISSION 0 +#define PROP_OUTLINETEXTUREUV 0 +#define PROP_OUTLINEMASKUV 0 +#define PROP_OUTLINESHADOWSTRENGTH 1 +#define PROPM_START_OUTLINEADVANCED 0 +#define PROP_OUTLINECULL 1 +#define PROP_OUTLINEOFFSETFACTOR 0 +#define PROP_OUTLINEOFFSETUNITS 0 +#define PROPM_END_OUTLINEADVANCED 0 +#define PROPM_PARALLAXMAP 0 +#define PROP_PARALLAXMAP 0 +#define PROP_PARALLAXHEIGHTMAPENABLED 0 +#define PROP_PARALLAXINTERNALMAPENABLED 0 +#define PROPM_START_PARALLAXHEIGHTMAP 0 +#define PROP_PARALLAXUV 0 +#define PROP_PARALLAXHEIGHTMAPMASKUV 0 +#define PROP_PARALLAXSTRENGTH 0 +#define PROPM_END_PARALLAXHEIGHTMAP 0 +#define PROPM_START_PARALLAXINTERNAL 0 +#define PROP_PARALLAXINTERNALHEIGHTMAPMODE 0 +#define PROP_PARALLAXINTERNALHEIGHTFROMALPHA 0 +#define PROP_PARALLAXINTERNALMAPMASKUV 0 +#define PROP_PARALLAXINTERNALITERATIONS 1 +#define PROP_PARALLAXINTERNALMINDEPTH 0 +#define PROP_PARALLAXINTERNALMAXDEPTH 1 +#define PROP_PARALLAXINTERNALMINFADE 0 +#define PROP_PARALLAXINTERNALMAXFADE 1 +#define PROPM_END_PARALLAXINTERNAL 0 +#define PROPM_START_PARALLAXADVANCED 0 +#define PROP_PARALLAXBIAS 0.42 +#define PROPM_END_PARALLAXADVANCED 0 +#define PROPM_THIRDPARTY 1 +#define PROPM_START_RALIV 1 +#define PROP_RALIVHELP 0 +#define PROPM_START_RALIVPENETRATOR 1 +#define PROP_PENETRATORENABLED 1 +#define PROP_SQUEEZE 0.032 +#define PROP_SQUEEZEDIST 0.0259 +#define PROP_BULGEOFFSET 0.158 +#define PROP_BULGEPOWER 0.00127 +#define PROP_LENGTH 0.12 +#define PROP_ENTRANCESTIFFNESS 0.01 +#define PROP_CURVATURE 0.324 +#define PROP_RECURVATURE -0.145 +#define PROP_WRIGGLESPEED 6.2 +#define PROP_WRIGGLE 0 +#define PROP__DIRTY 1 +#define PROPM_END_RALIVPENETRATOR 0 +#define PROPM_START_RALIVORIFACE 0 +#define PROP_ORIFACEENABLED 0 +#define PROP_ENTRYOPENDURATION 0.1 +#define PROP_SHAPE1DEPTH 0.1 +#define PROP_SHAPE1DURATION 0.1 +#define PROP_SHAPE2DEPTH 0.2 +#define PROP_SHAPE2DURATION 0.1 +#define PROP_SHAPE3DEPTH 0.3 +#define PROP_SHAPE3DURATION 0.1 +#define PROP_BLENDSHAPEPOWER 1 +#define PROP_BLENDSHAPEBADSCALEFIX 1 +#define PROPM_END_RALIVORIFACE 0 +#define PROPM_START_RALIVADVANCED 0 +#define PROP_RALIVADVANCEDHELP 0 +#define PROP_ORIFICECHANNEL 0 +#define PROPM_END_RALIVADVANCED 0 +#define PROPM_END_RALIV 0 +#define PROPM_RENDERINGOPTIONS 0 +#define PROP_CULL 2 +#define PROP_ZTEST 4 +#define PROP_ZWRITE 1 +#define PROP_COLORMASK 15 +#define PROP_OFFSETFACTOR 0 +#define PROP_OFFSETUNITS 0 +#define PROP_IGNOREFOG 0 +#define PROPINSTANCING 0 +#define PROPM_START_BLENDING 0 +#define PROP_BLENDOP 0 +#define PROP_BLENDOPALPHA 0 +#define PROP_SRCBLEND 1 +#define PROP_DSTBLEND 0 +#define PROPM_END_BLENDING 0 +#define PROPM_START_STENCILPASSOPTIONS 0 +#define PROP_STENCILREF 0 +#define PROP_STENCILREADMASK 255 +#define PROP_STENCILWRITEMASK 255 +#define PROP_STENCILPASSOP 0 +#define PROP_STENCILFAILOP 0 +#define PROP_STENCILZFAILOP 0 +#define PROP_STENCILCOMPAREFUNCTION 8 +#define PROPM_END_STENCILPASSOPTIONS 0 +#define PROPM_START_OUTLINESTENCIL 0 +#define PROP_OUTLINESTENCILREF 0 +#define PROP_OUTLINESTENCILREADMASK 255 +#define PROP_OUTLINESTENCILWRITEMASK 255 +#define PROP_OUTLINESTENCILPASSOP 0 +#define PROP_OUTLINESTENCILFAILOP 0 +#define PROP_OUTLINESTENCILZFAILOP 0 +#define PROP_OUTLINESTENCILCOMPAREFUNCTION 8 +#define PROPM_END_OUTLINESTENCIL 0 +#define PROPM_START_DEBUGOPTIONS 0 +#define PROP_DEBUGENABLED 0 +#define PROP_VERTEXUNWRAP 0 +#define PROP_DEBUGMESHDATA 0 +#define PROP_DEBUGLIGHTINGDATA 0 +#define PROP_DEBUGCAMERADATA 0 +#define PROPM_END_DEBUGOPTIONS 0 + + + #pragma target 5.0 + #define POI_META_PASS + float _Mode; + // UV Distortion +// #pragma shader_feature USER_LUT + // Hologram Alpha +// #pragma shader_feature DEPTH_OF_FIELD + //Video +// #pragma shader_feature BLOOM +// #pragma shader_feature _PARALLAXMAP + // Mirror +// #pragma shader_feature _REQUIRE_UV2 + // Random +// #pragma shader_feature _SUNDISK_NONE + // Hue Shift +// #pragma shader_feature COLOR_GRADING_HDR + // Dissolve +// #pragma shader_feature DISTORT + // Panosphere +// #pragma shader_feature _DETAIL_MULX2 + // Lighting +// #pragma shader_feature VIGNETTE_MASKED + // Flipbook +// #pragma shader_feature _SUNDISK_HIGH_QUALITY + // Rim Lighting +// #pragma shader_feature _GLOSSYREFLECTIONS_OFF + // Enviro Rim +// #pragma shader_feature _MAPPING_6_FRAMES_LAYOUT + // Metal +// #pragma shader_feature _METALLICGLOSSMAP + // Poi Shader Model +// #pragma shader_feature VIGNETTE_CLASSIC + // Iridescence +// #pragma shader_feature BLOOM_LENS_DIRT + // Matcap +// #pragma shader_feature _COLORADDSUBDIFF_ON + // Matcap 2 +// #pragma shader_feature COLOR_GRADING_HDR_3D + // Specular +// #pragma shader_feature _SPECGLOSSMAP + // Specular 2 +// #pragma shader_feature DITHERING + // SubSurface +// #pragma shader_feature _TERRAIN_NORMAL_MAP + // Debug +// #pragma shader_feature _COLOROVERLAY_ON + // Glitter +// #pragma shader_feature _SUNDISK_SIMPLE + // RGBMask +// #pragma shader_feature VIGNETTE + // RGB NORMALS +// #pragma shader_feature GEOM_TYPE_MESH + //Details +// #pragma shader_feature FINALPASS + // Text +// #pragma shader_feature EFFECT_BUMP + // Emission 1 +// #pragma shader_feature _EMISSION + // Emission 2 +// #pragma shader_feature EFFECT_HUE_VARIATION + // Clear Coat +// #pragma shader_feature _COLORCOLOR_ON + #pragma vertex vert + #pragma fragment frag + #include "../Includes/CGI_PoiPass.cginc" + ENDCG + + } + } +} diff --git a/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Shaders/S_Poiyomi_Pro.shader.meta b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Shaders/S_Poiyomi_Pro.shader.meta new file mode 100644 index 00000000..ae203983 --- /dev/null +++ b/VRCSDK3AvatarsLegacy/Assets/Avatars/Auri/materials/OptimizedShaders/auri poiyomi pro dps pp2/Shaders/S_Poiyomi_Pro.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 01b308eb11606c347ba323ad01c9abc2 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: |