[Add] All in one shader
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
//Prevent Unity warnings that are not relevant for this shader-------------------
|
||||
#pragma warning (disable : 3571) // pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
|
||||
#pragma warning (disable : 4008) // floating point division by zero
|
||||
#pragma warning (disable : 3206) // implicit truncation of vector type
|
||||
//BLURS-------------------------------------------------------------------------
|
||||
half4 Blur(half2 uv, sampler2D source, half Intensity)
|
||||
{
|
||||
const half2 texelSize = 1.0 / _ScreenParams.xy;
|
||||
const half4 color = tex2D(source, uv);
|
||||
const half2 offset = Intensity * texelSize;
|
||||
|
||||
half4 accumulatedColor = color;
|
||||
half accumulatedWeight = 1.0;
|
||||
for (int x = -1; x <= 1; x++)
|
||||
{
|
||||
for (int y = -1; y <= 1; y++)
|
||||
{
|
||||
const half2 sampleUV = uv + half2(x, y) * offset;
|
||||
const half4 sampleColor = tex2D(source, sampleUV);
|
||||
|
||||
accumulatedColor += sampleColor;
|
||||
accumulatedWeight += 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
half4 blurredColor = accumulatedColor / accumulatedWeight;
|
||||
return blurredColor;
|
||||
}
|
||||
|
||||
half BlurHD_G(half bhqp, half x)
|
||||
{
|
||||
return exp(-(x * x) / (2.0 * bhqp * bhqp));
|
||||
}
|
||||
half4 BlurHD(half2 uv, sampler2D source, half BlurAmount, half xScale, half yScale)
|
||||
{
|
||||
int iterations = 16;
|
||||
int halfIterations = iterations / 2;
|
||||
half sigmaX = 0.1 + BlurAmount * 0.5;
|
||||
half sigmaY = sigmaX;
|
||||
half total = 0.0;
|
||||
half4 ret = half4(0, 0, 0, 0);
|
||||
for (int iy = 0; iy < iterations; ++iy)
|
||||
{
|
||||
half fy = BlurHD_G(sigmaY, half(iy) -half(halfIterations));
|
||||
half offsetY = half(iy - halfIterations) * 0.00390625 * xScale;
|
||||
for (int ix = 0; ix < iterations; ++ix)
|
||||
{
|
||||
half fx = BlurHD_G(sigmaX, half(ix) - half(halfIterations));
|
||||
half offsetX = half(ix - halfIterations) * 0.00390625 * yScale;
|
||||
total += fx * fy;
|
||||
ret += tex2D(source, uv + half2(offsetX, offsetY)) * fx * fy;
|
||||
}
|
||||
}
|
||||
return ret / total;
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
half rand(half2 seed, half offset) {
|
||||
return (frac(sin(dot(seed, half2(12.9898, 78.233))) * 43758.5453) + offset) % 1.0;
|
||||
}
|
||||
|
||||
half rand2(half2 seed, half offset, half speed) {
|
||||
return (frac(sin(dot(seed * floor(50 + (_Time.x % 1.0) * 12. * speed), half2(127.1, 311.7))) * 43758.5453123) + offset) % 1.0;
|
||||
}
|
||||
|
||||
half rand2CustomTime(half2 seed, half offset, half customTime, half speed) {
|
||||
return (frac(sin(dot(seed * floor(50 + (customTime % 1.0) * 12. * speed), half2(127.1, 311.7))) * 43758.5453123) + offset) % 1.0;
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
half RemapFloat(half inValue, half inMin, half inMax, half outMin, half outMax){
|
||||
return outMin + (inValue - inMin) * (outMax - outMin) / (inMax - inMin);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df06cdcb3555be745b54ff3003fa687e
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/AllIn1OneShaderFunctions.cginc
|
||||
uploadId: 857600
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a36b7719ff0465b42ab1407d67672c5f
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _GlowTex: {instanceID: 0}
|
||||
- _FadeTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3}
|
||||
- _FadeBurnTex: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3}
|
||||
- _OutlineTex: {fileID: 2800000, guid: 74087f6d03f233e4a8a142fa01f9e5cf, type: 3}
|
||||
- _OutlineDistortTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97,
|
||||
type: 3}
|
||||
- _ColorSwapTex: {instanceID: 0}
|
||||
- _ColorRampTex: {fileID: 2800000, guid: 279657edc397ece4b8029c727adf6ddc, type: 3}
|
||||
- _DistortTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3}
|
||||
- _ShineMask: {instanceID: 0}
|
||||
- _ColorRampTexGradient: {instanceID: 0}
|
||||
- _OverlayTex: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3}
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/AllIn1SpriteShader.shader
|
||||
uploadId: 857600
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 86ce7e600deb17e429b8be445bb652f7
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/AllIn1SpriteShaderLit.shader
|
||||
uploadId: 857600
|
||||
File diff suppressed because it is too large
Load Diff
+16
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4cab4aa8ce3e6774aa0d904ec70df88e
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/AllIn1SpriteShaderLitTransparent.shader
|
||||
uploadId: 857600
|
||||
@@ -0,0 +1,350 @@
|
||||
Shader "AllIn1SpriteShader/AllIn1SpriteShaderSRPBatch"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[NoScaleOffset]_MainTex ("Main Texture", 2D) = "white" {} //0
|
||||
_Color("Main Color", Color) = (1,1,1,1) //1
|
||||
_Alpha("General Alpha", Range(0,1)) = 1 //2
|
||||
|
||||
_GlowColor("Glow Color", Color) = (1,1,1,1) //3
|
||||
_Glow("Glow Color Intensity", Range(0,100)) = 10 //4
|
||||
_GlowGlobal("Global Glow Intensity", Range(1,100)) = 1 //5
|
||||
[NoScaleOffset] _GlowTex("Glow Texture", 2D) = "white" {} //6
|
||||
|
||||
[NoScaleOffset]_FadeTex("Fade Texture", 2D) = "white" {} //7
|
||||
_FadeAmount("Fade Amount", Range(-0.1,1)) = -0.1 //8
|
||||
_FadeBurnWidth("Fade Burn Width", Range(0,1)) = 0.025 //9
|
||||
_FadeBurnTransition("Burn Transition", Range(0.01,0.5)) = 0.075 //10
|
||||
_FadeBurnColor("Fade Burn Color", Color) = (1,1,0,1) //11
|
||||
[NoScaleOffset]_FadeBurnTex("Fade Burn Texture", 2D) = "white" {} //12
|
||||
_FadeBurnGlow("Fade Burn Glow", Range(1,250)) = 2//13
|
||||
|
||||
_OutlineColor("Outline Base Color", Color) = (1,1,1,1) //14
|
||||
_OutlineAlpha("Outline Base Alpha", Range(0,1)) = 1 //15
|
||||
_OutlineGlow("Outline Base Glow", Range(1,100)) = 1.5 //16
|
||||
_OutlineWidth("Outline Base Width", Range(0,0.2)) = 0.004 //17
|
||||
_OutlinePixelWidth("Outline Base Pixel Width", Int) = 1 //18
|
||||
|
||||
[Space]
|
||||
[NoScaleOffset]_OutlineTex("Outline Texture", 2D) = "white" {} //19
|
||||
_OutlineTexXSpeed("Texture scroll speed X", Range(-50,50)) = 10 //20
|
||||
_OutlineTexYSpeed("Texture scroll speed Y", Range(-50,50)) = 0 //21
|
||||
|
||||
[Space]
|
||||
[NoScaleOffset]_OutlineDistortTex("Outline Distortion Texture", 2D) = "white" {} //22
|
||||
_OutlineDistortAmount("Outline Distortion Amount", Range(0,2)) = 0.5 //23
|
||||
_OutlineDistortTexXSpeed("Distortion scroll speed X", Range(-50,50)) = 5 //24
|
||||
_OutlineDistortTexYSpeed("Distortion scroll speed Y", Range(-50,50)) = 5 //25
|
||||
|
||||
_AlphaOutlineColor("Color", Color) = (1, 1, 1, 1) //26
|
||||
_AlphaOutlineGlow("Outline Glow", Range(1,100)) = 5 //27
|
||||
_AlphaOutlinePower("Power", Range(0, 5)) = 1 // 28
|
||||
_AlphaOutlineMinAlpha("Min Alpha", Range(0, 1)) = 0 // 29
|
||||
_AlphaOutlineBlend("Blend", Range(0, 1)) = 1 // 30
|
||||
|
||||
_GradBlend("Gradient Blend", Range(0,1)) = 1 //31
|
||||
_GradTopLeftCol("Top Color", Color) = (1,0,0,1) //32
|
||||
_GradTopRightCol("Top Color 2", Color) = (1, 1, 0, 1) //33
|
||||
_GradBotLeftCol("Bot Color", Color) = (0,0,1,1) //34
|
||||
_GradBotRightCol("Bot Color 2", Color) = (0, 1, 0, 1) //35
|
||||
|
||||
[NoScaleOffset] _ColorSwapTex("Color Swap Texture", 2D) = "black" {} //36
|
||||
[HDR] _ColorSwapRed("Red Channel", Color) = (1,1,1,1) //37
|
||||
_ColorSwapRedLuminosity("Red luminosity", Range(-1,1)) = 0.5 //38
|
||||
[HDR] _ColorSwapGreen("Green Channel", Color) = (1,1,1,1) //39
|
||||
_ColorSwapGreenLuminosity("Green luminosity", Range(-1,1)) = 0.5 //40
|
||||
[HDR] _ColorSwapBlue("Blue Channel", Color) = (1,1,1,1) //41
|
||||
_ColorSwapBlueLuminosity("Blue luminosity", Range(-1,1)) = 0.5 //42
|
||||
|
||||
_HsvShift("Hue Shift", Range(0, 360)) = 180 //43
|
||||
_HsvSaturation("Saturation", Range(0, 2)) = 1 //44
|
||||
_HsvBright("Brightness", Range(0, 2)) = 1 //45
|
||||
|
||||
_HitEffectColor("Hit Effect Color", Color) = (1,1,1,1) //46
|
||||
_HitEffectGlow("Glow Intensity", Range(1,100)) = 5 //47
|
||||
[Space]
|
||||
_HitEffectBlend("Hit Effect Blend", Range(0,1)) = 1 //48
|
||||
|
||||
_NegativeAmount("Negative Amount", Range(0, 1)) = 1 //49
|
||||
|
||||
_PixelateSize("Pixelate size", Range(4,512)) = 32 //50
|
||||
|
||||
[NoScaleOffset] _ColorRampTex("Color ramp Texture", 2D) = "white" {} //51
|
||||
_ColorRampLuminosity("Color ramp luminosity", Range(-1,1)) = 0 //52
|
||||
[Toggle()] _ColorRampOutline("Affects everything?", float) = 0 //53
|
||||
|
||||
_GreyscaleLuminosity("Greyscale luminosity", Range(-1,1)) = 0 //54
|
||||
[Toggle()] _GreyscaleOutline("Affects everything?", float) = 0 //55
|
||||
_GreyscaleTintColor("Greyscale Tint Color", Color) = (1,1,1,1) //56
|
||||
|
||||
_PosterizeNumColors("Number of Colors", Range(0,100)) = 8 //57
|
||||
_PosterizeGamma("Posterize Amount", Range(0.1,10)) = 0.75 //58
|
||||
[Toggle()] _PosterizeOutline("Affects everything?", float) = 0 //59
|
||||
|
||||
_BlurIntensity("Blur Intensity", Range(0,100)) = 10 //60
|
||||
[Toggle()] _BlurHD("Blur is Low Res?", float) = 0 //61
|
||||
|
||||
_MotionBlurAngle("Motion Blur Angle", Range(-1, 1)) = 0.1 //62
|
||||
_MotionBlurDist("Motion Blur Distance", Range(-3, 3)) = 1.25 //63
|
||||
|
||||
_GhostColorBoost("Ghost Color Boost", Range(0,5)) = 1 //64
|
||||
_GhostTransparency("Ghost Transparency", Range(0,1)) = 0 //65
|
||||
|
||||
_InnerOutlineColor("Inner Outline Color", Color) = (1,0,0,1) //66
|
||||
_InnerOutlineThickness("Outline Thickness", Range(0,3)) = 1 //67
|
||||
_InnerOutlineAlpha("Inner Outline Alpha", Range(0,1)) = 1 //68
|
||||
_InnerOutlineGlow("Inner Outline Glow", Range(1,250)) = 4 //69
|
||||
|
||||
_AlphaCutoffValue("Alpha cutoff value", Range(0, 1)) = 0.25 //70
|
||||
|
||||
[Toggle()] _OnlyOutline("Only render outline?", float) = 0 //71
|
||||
[Toggle()] _OnlyInnerOutline("Only render inner outline?", float) = 0 //72
|
||||
|
||||
_HologramStripesAmount("Stripes Amount", Range(0, 1)) = 0.1 //73
|
||||
_HologramUnmodAmount("Unchanged Amount", Range(0, 1)) = 0.0 //74
|
||||
_HologramStripesSpeed("Stripes Speed", Range(-20, 20)) = 4.5 //75
|
||||
_HologramMinAlpha("Min Alpha", Range(0, 1)) = 0.1 //76
|
||||
_HologramMaxAlpha("Max Alpha", Range(0, 100)) = 0.75 //77
|
||||
|
||||
_ChromAberrAmount("ChromAberr Amount", Range(0, 1)) = 1 //78
|
||||
_ChromAberrAlpha("ChromAberr Alpha", Range(0, 1)) = 0.4 //79
|
||||
|
||||
_GlitchAmount("Glitch Amount", Range(0, 20)) = 3 //80
|
||||
|
||||
_FlickerPercent("Flicker Percent", Range(0, 1)) = 0.05 //81
|
||||
_FlickerFreq("Flicker Frequency", Range(0, 5)) = 0.2 //82
|
||||
_FlickerAlpha("Flicker Alpha", Range(0, 1)) = 0 //83
|
||||
|
||||
_ShadowX("Shadow X Axis", Range(-0.5, 0.5)) = 0.1 //84
|
||||
_ShadowY("Shadow Y Axis", Range(-0.5, 0.5)) = -0.05 //85
|
||||
_ShadowAlpha("Shadow Alpha", Range(0, 1)) = 0.5 //86
|
||||
_ShadowColor("Shadow Color", Color) = (0, 0, 0, 1) //87
|
||||
|
||||
_HandDrawnAmount("Hand Drawn Amount", Range(0, 20)) = 10 //88
|
||||
_HandDrawnSpeed("Hand Drawn Speed", Range(1, 15)) = 5 //89
|
||||
|
||||
_GrassSpeed("Speed", Range(0,50)) = 2 //90
|
||||
_GrassWind("Bend amount", Range(0,50)) = 20 //91
|
||||
[Space]
|
||||
[Toggle()] _GrassManualToggle("Manually animated?", float) = 0 //92
|
||||
_GrassManualAnim("Manual Anim Value", Range(-1,1)) = 1 //93
|
||||
|
||||
_WaveAmount("Wave Amount", Range(0, 25)) = 7 //94
|
||||
_WaveSpeed("Wave Speed", Range(0, 25)) = 10 //95
|
||||
_WaveStrength("Wave Strength", Range(0, 25)) = 7.5 //96
|
||||
_WaveX("Wave X Axis", Range(0, 1)) = 0 //97
|
||||
_WaveY("Wave Y Axis", Range(0, 1)) = 0.5 //98
|
||||
|
||||
_RectSize("Rect Size", Range(1, 4)) = 1 //99
|
||||
|
||||
_OffsetUvX("X axis", Range(-1, 1)) = 0 //100
|
||||
_OffsetUvY("Y axis", Range(-1, 1)) = 0 //101
|
||||
|
||||
_ClipUvLeft("Clipping Left", Range(0, 1)) = 0 //102
|
||||
_ClipUvRight("Clipping Right", Range(0, 1)) = 0 //103
|
||||
_ClipUvUp("Clipping Up", Range(0, 1)) = 0 //104
|
||||
_ClipUvDown("Clipping Down", Range(0, 1)) = 0 //105
|
||||
|
||||
_TextureScrollXSpeed("Speed X Axis", Range(-5, 5)) = 1 //106
|
||||
_TextureScrollYSpeed("Speed Y Axis", Range(-5, 5)) = 0 //107
|
||||
|
||||
_ZoomUvAmount("Zoom Amount", Range(0.1, 5)) = 0.5 //108
|
||||
|
||||
[NoScaleOffset]_DistortTex("Distortion Texture", 2D) = "white" {} //109
|
||||
_DistortAmount("Distortion Amount", Range(0,2)) = 0.5 //110
|
||||
_DistortTexXSpeed("Scroll speed X", Range(-50,50)) = 5 //111
|
||||
_DistortTexYSpeed("Scroll speed Y", Range(-50,50)) = 5 //112
|
||||
|
||||
_TwistUvAmount("Twist Amount", Range(0, 3.1416)) = 1 //113
|
||||
_TwistUvPosX("Twist Pos X Axis", Range(0, 1)) = 0.5 //114
|
||||
_TwistUvPosY("Twist Pos Y Axis", Range(0, 1)) = 0.5 //115
|
||||
_TwistUvRadius("Twist Radius", Range(0, 3)) = 0.75 //116
|
||||
|
||||
_RotateUvAmount("Rotate Angle(radians)", Range(0, 6.2831)) = 0 //117
|
||||
|
||||
_FishEyeUvAmount("Fish Eye Amount", Range(0, 0.5)) = 0.35 //118
|
||||
|
||||
_PinchUvAmount("Pinch Amount", Range(0, 0.5)) = 0.35 //119
|
||||
|
||||
_ShakeUvSpeed("Shake Speed", Range(0, 20)) = 2.5 //120
|
||||
_ShakeUvX("X Multiplier", Range(0, 5)) = 1.5 //121
|
||||
_ShakeUvY("Y Multiplier", Range(0, 5)) = 1 //122
|
||||
|
||||
_ColorChangeTolerance("Tolerance", Range(0, 1)) = 0.25 //123
|
||||
_ColorChangeTarget("Color to change", Color) = (1, 0, 0, 1) //124
|
||||
[HDR] _ColorChangeNewCol("New Color", Color) = (1, 1, 0, 1) //125
|
||||
_ColorChangeLuminosity("New Color Luminosity", Range(0, 1)) = 0.0 //126
|
||||
|
||||
_RoundWaveStrength("Wave Strength", Range(0, 1)) = 0.7 //127
|
||||
_RoundWaveSpeed("Wave Speed", Range(0, 5)) = 2 //128
|
||||
|
||||
[Toggle()] _BillboardY("Billboard on both axis?", float) = 0 //129
|
||||
_ZWrite ("Depth Write", Float) = 0.0 // 130
|
||||
|
||||
_MySrcMode ("SrcMode", Float) = 5 // 131
|
||||
_MyDstMode ("DstMode", Float) = 10 // 132
|
||||
|
||||
_ShineColor("Shine Color", Color) = (1,1,1,1) // 133
|
||||
_ShineLocation("Shine Location", Range(0,1)) = 0.5 // 134
|
||||
_ShineRotate("Rotate Angle(radians)", Range(0, 6.2831)) = 0 //135
|
||||
_ShineWidth("Shine Width", Range(0.05,1)) = 0.1 // 136
|
||||
_ShineGlow("Shine Glow", Range(0,100)) = 1 // 137
|
||||
[NoScaleOffset] _ShineMask("Shine Mask", 2D) = "white" {} // 138
|
||||
|
||||
_GlitchSize("Glitch Size", Range(0.25, 5)) = 1 //139
|
||||
_HologramStripeColor("Stripes Color", Color) = (0,1,1,1) //140
|
||||
_GradBoostX("Boost X axis", Range(0.1, 5)) = 1.2 //141
|
||||
_GradBoostY("Boost Y axis", Range(0.1, 5)) = 1.2 //142
|
||||
[Toggle()] _GradIsRadial("Radial Gradient?", float) = 0 //143
|
||||
_AlphaRoundThreshold("Round Threshold", Range(0.005, 1.0)) = 0.5 //144
|
||||
_GrassRadialBend("Radial Bend", Range(0.0, 5.0)) = 0.1 //145
|
||||
|
||||
_ColorChangeTolerance2("Tolerance 2", Range(0, 1)) = 0.25 //146
|
||||
_ColorChangeTarget2("Color to change 2", Color) = (1, 0, 0, 1) //147
|
||||
[HDR] _ColorChangeNewCol2("New Color 2", Color) = (1, 1, 0, 1) //148
|
||||
_ColorChangeTolerance3("Tolerance 3", Range(0, 1)) = 0.25 //149
|
||||
_ColorChangeTarget3("Color to change 3", Color) = (1, 0, 0, 1) //150
|
||||
[HDR] _ColorChangeNewCol3("New Color 3", Color) = (1, 1, 0, 1) //151
|
||||
|
||||
_Contrast ("Contrast", Range(0, 6)) = 1 // 152
|
||||
_Brightness ("Brightness", Range(-1, 1)) = 0 // 153
|
||||
|
||||
_ColorSwapBlend ("Color Swap Blend", Range(0, 1)) = 1 // 154
|
||||
_ColorRampBlend ("Color Ramp Blend", Range(0, 1)) = 1 // 155
|
||||
_GreyscaleBlend ("Greyscale Blend", Range(0, 1)) = 1 // 156
|
||||
_GhostBlend ("Ghost Blend", Range(0, 1)) = 1 // 157
|
||||
_HologramBlend ("Hologram Blend", Range(0, 1)) = 1 // 158
|
||||
|
||||
[AllIn1ShaderGradient] _ColorRampTexGradient("Color ramp Gradient", 2D) = "white" {} //159
|
||||
|
||||
[NoScaleOffset]_OverlayTex("Overlay Texture", 2D) = "white" {} //160
|
||||
_OverlayColor("Overlay Color", Color) = (1, 1, 1, 1) //161
|
||||
_OverlayGlow("Overlay Glow", Range(0,25)) = 1 // 162
|
||||
_OverlayBlend("Overlay Blend", Range(0, 1)) = 1 // 163
|
||||
|
||||
_RadialStartAngle("Radial Start Angle", Range(0, 360)) = 90 //164
|
||||
_RadialClip("Radial Clip", Range(0, 360)) = 45 //165
|
||||
_RadialClip2("Radial Clip 2", Range(0, 360)) = 0 //166
|
||||
|
||||
_WarpStrength("Warp Strength", Range(0, 0.1)) = 0.025 //167
|
||||
_WarpSpeed("Warp Speed", Range(0, 25)) = 8 //168
|
||||
_WarpScale("Warp Scale", Range(0.05, 3)) = 0.5 //169
|
||||
|
||||
_OverlayTextureScrollXSpeed("Speed X Axis", Range(-5, 5)) = 0.25 //170
|
||||
_OverlayTextureScrollYSpeed("Speed Y Axis", Range(-5, 5)) = 0.25 //171
|
||||
|
||||
/**/
|
||||
_MainTex_ScaleAndTiling("Main Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //172
|
||||
_FadeTex_ScaleAndTiling("Fade Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //173
|
||||
_FadeBurnTex_ScaleAndTiling("Fade Burn Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //174
|
||||
_OutlineTex_ScaleAndTiling("Outline Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //175
|
||||
_OutlineDistortTex_ScaleAndTiling("Outline Distort Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //176
|
||||
_DistortTex_ScaleAndTiling("Distort Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //177
|
||||
_OverlayTex_ScaleAndTiling("Overlay Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //178
|
||||
/**/
|
||||
|
||||
_GlitchSpeed("Glitch Speed", Range(0.0, 100)) = 20 //179
|
||||
|
||||
_ZTestMode ("Z Test Mode", Float) = 4
|
||||
_CullingOption ("Culling Option", float) = 0
|
||||
|
||||
[HideInInspector] _MinXUV("_MinXUV", Range(0, 1)) = 0.0
|
||||
[HideInInspector] _MaxXUV("_MaxXUV", Range(0, 1)) = 1.0
|
||||
[HideInInspector] _MinYUV("_MinYUV", Range(0, 1)) = 0.0
|
||||
[HideInInspector] _MaxYUV("_MaxYUV", Range(0, 1)) = 1.0
|
||||
[HideInInspector] _RandomSeed("_MaxYUV", Range(0, 10000)) = 0.0
|
||||
_EditorDrawers("Editor Drawers", Int) = 6
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.high-definition" : "12.1"
|
||||
}
|
||||
|
||||
Tags { "Queue" = "Transparent" "CanUseSpriteAtlas" = "True" "IgnoreProjector" = "True" "RenderType" = "Transparent" "PreviewType" = "Plane" }
|
||||
Blend [_MySrcMode] [_MyDstMode]
|
||||
Cull [_CullingOption]
|
||||
ZWrite [_ZWrite]
|
||||
ZTest [_ZTestMode]
|
||||
|
||||
Pass
|
||||
{
|
||||
HLSLPROGRAM
|
||||
#pragma target 4.5
|
||||
#pragma multi_compile_instancing
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define HDRP_PASS
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl"
|
||||
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_CommonFunctions.hlsl"
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_HDRPHelper.hlsl"
|
||||
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_Structs.hlsl"
|
||||
#include_with_pragmas "ShaderLibrary/AllIn1SpriteShaderSRP_ShaderFeatures.hlsl"
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_Properties.hlsl"
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_VertexPass.hlsl"
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_FragmentPass.hlsl"
|
||||
|
||||
|
||||
|
||||
#if FOG_ON
|
||||
#pragma multi_compile_fog
|
||||
#endif
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.universal" : "12.0"
|
||||
}
|
||||
|
||||
Tags { "Queue" = "Transparent" "CanUseSpriteAtlas" = "True" "IgnoreProjector" = "True" "RenderType" = "Transparent" "PreviewType" = "Plane" }
|
||||
Blend [_MySrcMode] [_MyDstMode]
|
||||
Cull [_CullingOption]
|
||||
ZWrite [_ZWrite]
|
||||
ZTest [_ZTestMode]
|
||||
|
||||
Pass
|
||||
{
|
||||
HLSLPROGRAM
|
||||
#pragma multi_compile_instancing
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#define URP_PASS
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_CommonFunctions.hlsl"
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_URPHelper.hlsl"
|
||||
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_Structs.hlsl"
|
||||
#include_with_pragmas "ShaderLibrary/AllIn1SpriteShaderSRP_ShaderFeatures.hlsl"
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_Properties.hlsl"
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_VertexPass.hlsl"
|
||||
#include "ShaderLibrary/AllIn1SpriteShaderSRP_FragmentPass.hlsl"
|
||||
|
||||
|
||||
|
||||
#if FOG_ON
|
||||
#pragma multi_compile_fog
|
||||
#endif
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
//Fallback "AllIn1SpriteShader/AllIn1SpriteShader"
|
||||
CustomEditor "AllIn1SpriteShader.AllIn1SpriteShaderMaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e09cd2cd29cb3c45b69adf230c51ae0
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/AllIn1SpriteShaderSRPBatch.shader
|
||||
uploadId: 857600
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f3622b3ac1631ea409b0f5811034f3a9
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _GlowTex: {instanceID: 0}
|
||||
- _FadeTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3}
|
||||
- _FadeBurnTex: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3}
|
||||
- _OutlineTex: {fileID: 2800000, guid: 74087f6d03f233e4a8a142fa01f9e5cf, type: 3}
|
||||
- _OutlineDistortTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97,
|
||||
type: 3}
|
||||
- _ColorSwapTex: {instanceID: 0}
|
||||
- _ColorRampTex: {fileID: 2800000, guid: 279657edc397ece4b8029c727adf6ddc, type: 3}
|
||||
- _DistortTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3}
|
||||
- _ShineMask: {instanceID: 0}
|
||||
- _ColorRampTexGradient: {instanceID: 0}
|
||||
- _OverlayTex: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3}
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/AllIn1SpriteShaderScaledTime.shader
|
||||
uploadId: 857600
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a53f4bb29f3644b43b5075c6dcfecb32
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _GlowTex: {instanceID: 0}
|
||||
- _FadeTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3}
|
||||
- _FadeBurnTex: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3}
|
||||
- _OutlineTex: {fileID: 2800000, guid: 74087f6d03f233e4a8a142fa01f9e5cf, type: 3}
|
||||
- _OutlineDistortTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97,
|
||||
type: 3}
|
||||
- _ColorSwapTex: {instanceID: 0}
|
||||
- _ColorRampTex: {fileID: 2800000, guid: 279657edc397ece4b8029c727adf6ddc, type: 3}
|
||||
- _DistortTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3}
|
||||
- _ShineMask: {instanceID: 0}
|
||||
- _ColorRampTexGradient: {instanceID: 0}
|
||||
- _OverlayTex: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3}
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/AllIn1SpriteShaderUiMask.shader
|
||||
uploadId: 857600
|
||||
File diff suppressed because it is too large
Load Diff
+29
@@ -0,0 +1,29 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e89361f7792fee34fbaa655df899c819
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures:
|
||||
- _MainTex: {instanceID: 0}
|
||||
- _GlowTex: {instanceID: 0}
|
||||
- _FadeTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3}
|
||||
- _FadeBurnTex: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3}
|
||||
- _OutlineTex: {fileID: 2800000, guid: 74087f6d03f233e4a8a142fa01f9e5cf, type: 3}
|
||||
- _OutlineDistortTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97,
|
||||
type: 3}
|
||||
- _ColorSwapTex: {instanceID: 0}
|
||||
- _ColorRampTex: {fileID: 2800000, guid: 279657edc397ece4b8029c727adf6ddc, type: 3}
|
||||
- _DistortTex: {fileID: 2800000, guid: 7aad8c583ef292e48b06af0d1f2fab97, type: 3}
|
||||
- _ShineMask: {instanceID: 0}
|
||||
- _ColorRampTexGradient: {instanceID: 0}
|
||||
- _OverlayTex: {fileID: 2800000, guid: 677cca399782dea41aedc1d292ecb67d, type: 3}
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/AllIn1SpriteShaderUiMaskScaledTime.shader
|
||||
uploadId: 857600
|
||||
@@ -0,0 +1,466 @@
|
||||
Shader "AllIn1SpriteShader/AllIn1Urp2dRenderer"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[NoScaleOffset]_MainTex ("Main Texture", 2D) = "white" {} //0
|
||||
_Color("Main Color", Color) = (1,1,1,1) //1
|
||||
_Alpha("General Alpha", Range(0,1)) = 1 //2
|
||||
|
||||
_GlowColor("Glow Color", Color) = (1,1,1,1) //3
|
||||
_Glow("Glow Color Intensity", Range(0,100)) = 10 //4
|
||||
_GlowGlobal("Global Glow Intensity", Range(1,100)) = 1 //5
|
||||
[NoScaleOffset] _GlowTex("Glow Texture", 2D) = "white" {} //6
|
||||
|
||||
[NoScaleOffset]_FadeTex("Fade Texture", 2D) = "white" {} //7
|
||||
_FadeAmount("Fade Amount", Range(-0.1,1)) = -0.1 //8
|
||||
_FadeBurnWidth("Fade Burn Width", Range(0,1)) = 0.025 //9
|
||||
_FadeBurnTransition("Burn Transition", Range(0.01,0.5)) = 0.075 //10
|
||||
_FadeBurnColor("Fade Burn Color", Color) = (1,1,0,1) //11
|
||||
[NoScaleOffset]_FadeBurnTex("Fade Burn Texture", 2D) = "white" {} //12
|
||||
_FadeBurnGlow("Fade Burn Glow", Range(1,250)) = 2//13
|
||||
|
||||
_OutlineColor("Outline Base Color", Color) = (1,1,1,1) //14
|
||||
_OutlineAlpha("Outline Base Alpha", Range(0,1)) = 1 //15
|
||||
_OutlineGlow("Outline Base Glow", Range(1,100)) = 1.5 //16
|
||||
_OutlineWidth("Outline Base Width", Range(0,0.2)) = 0.004 //17
|
||||
_OutlinePixelWidth("Outline Base Pixel Width", Int) = 1 //18
|
||||
|
||||
[Space]
|
||||
[NoScaleOffset]_OutlineTex("Outline Texture", 2D) = "white" {} //19
|
||||
_OutlineTexXSpeed("Texture scroll speed X", Range(-50,50)) = 10 //20
|
||||
_OutlineTexYSpeed("Texture scroll speed Y", Range(-50,50)) = 0 //21
|
||||
|
||||
[Space]
|
||||
[NoScaleOffset]_OutlineDistortTex("Outline Distortion Texture", 2D) = "white" {} //22
|
||||
_OutlineDistortAmount("Outline Distortion Amount", Range(0,2)) = 0.5 //23
|
||||
_OutlineDistortTexXSpeed("Distortion scroll speed X", Range(-50,50)) = 5 //24
|
||||
_OutlineDistortTexYSpeed("Distortion scroll speed Y", Range(-50,50)) = 5 //25
|
||||
|
||||
_AlphaOutlineColor("Color", Color) = (1, 1, 1, 1) //26
|
||||
_AlphaOutlineGlow("Outline Glow", Range(1,100)) = 5 //27
|
||||
_AlphaOutlinePower("Power", Range(0, 5)) = 1 // 28
|
||||
_AlphaOutlineMinAlpha("Min Alpha", Range(0, 1)) = 0 // 29
|
||||
_AlphaOutlineBlend("Blend", Range(0, 1)) = 1 // 30
|
||||
|
||||
_GradBlend("Gradient Blend", Range(0,1)) = 1 //31
|
||||
_GradTopLeftCol("Top Color", Color) = (1,0,0,1) //32
|
||||
_GradTopRightCol("Top Color 2", Color) = (1, 1, 0, 1) //33
|
||||
_GradBotLeftCol("Bot Color", Color) = (0,0,1,1) //34
|
||||
_GradBotRightCol("Bot Color 2", Color) = (0, 1, 0, 1) //35
|
||||
|
||||
[NoScaleOffset] _ColorSwapTex("Color Swap Texture", 2D) = "black" {} //36
|
||||
[HDR] _ColorSwapRed("Red Channel", Color) = (1,1,1,1) //37
|
||||
_ColorSwapRedLuminosity("Red luminosity", Range(-1,1)) = 0.5 //38
|
||||
[HDR] _ColorSwapGreen("Green Channel", Color) = (1,1,1,1) //39
|
||||
_ColorSwapGreenLuminosity("Green luminosity", Range(-1,1)) = 0.5 //40
|
||||
[HDR] _ColorSwapBlue("Blue Channel", Color) = (1,1,1,1) //41
|
||||
_ColorSwapBlueLuminosity("Blue luminosity", Range(-1,1)) = 0.5 //42
|
||||
|
||||
_HsvShift("Hue Shift", Range(0, 360)) = 180 //43
|
||||
_HsvSaturation("Saturation", Range(0, 2)) = 1 //44
|
||||
_HsvBright("Brightness", Range(0, 2)) = 1 //45
|
||||
|
||||
_HitEffectColor("Hit Effect Color", Color) = (1,1,1,1) //46
|
||||
_HitEffectGlow("Glow Intensity", Range(1,100)) = 5 //47
|
||||
[Space]
|
||||
_HitEffectBlend("Hit Effect Blend", Range(0,1)) = 1 //48
|
||||
|
||||
_NegativeAmount("Negative Amount", Range(0, 1)) = 1 //49
|
||||
|
||||
_PixelateSize("Pixelate size", Range(4,512)) = 32 //50
|
||||
|
||||
[NoScaleOffset] _ColorRampTex("Color ramp Texture", 2D) = "white" {} //51
|
||||
_ColorRampLuminosity("Color ramp luminosity", Range(-1,1)) = 0 //52
|
||||
[Toggle()] _ColorRampOutline("Affects everything?", float) = 0 //53
|
||||
|
||||
_GreyscaleLuminosity("Greyscale luminosity", Range(-1,1)) = 0 //54
|
||||
[Toggle()] _GreyscaleOutline("Affects everything?", float) = 0 //55
|
||||
_GreyscaleTintColor("Greyscale Tint Color", Color) = (1,1,1,1) //56
|
||||
|
||||
_PosterizeNumColors("Number of Colors", Range(0,100)) = 8 //57
|
||||
_PosterizeGamma("Posterize Amount", Range(0.1,10)) = 0.75 //58
|
||||
[Toggle()] _PosterizeOutline("Affects everything?", float) = 0 //59
|
||||
|
||||
_BlurIntensity("Blur Intensity", Range(0,100)) = 10 //60
|
||||
[Toggle()] _BlurHD("Blur is Low Res?", float) = 0 //61
|
||||
|
||||
_MotionBlurAngle("Motion Blur Angle", Range(-1, 1)) = 0.1 //62
|
||||
_MotionBlurDist("Motion Blur Distance", Range(-3, 3)) = 1.25 //63
|
||||
|
||||
_GhostColorBoost("Ghost Color Boost", Range(0,5)) = 1 //64
|
||||
_GhostTransparency("Ghost Transparency", Range(0,1)) = 0 //65
|
||||
|
||||
_InnerOutlineColor("Inner Outline Color", Color) = (1,0,0,1) //66
|
||||
_InnerOutlineThickness("Outline Thickness", Range(0,3)) = 1 //67
|
||||
_InnerOutlineAlpha("Inner Outline Alpha", Range(0,1)) = 1 //68
|
||||
_InnerOutlineGlow("Inner Outline Glow", Range(1,250)) = 4 //69
|
||||
|
||||
_AlphaCutoffValue("Alpha cutoff value", Range(0, 1)) = 0.25 //70
|
||||
|
||||
[Toggle()] _OnlyOutline("Only render outline?", float) = 0 //71
|
||||
[Toggle()] _OnlyInnerOutline("Only render inner outline?", float) = 0 //72
|
||||
|
||||
_HologramStripesAmount("Stripes Amount", Range(0, 1)) = 0.1 //73
|
||||
_HologramUnmodAmount("Unchanged Amount", Range(0, 1)) = 0.0 //74
|
||||
_HologramStripesSpeed("Stripes Speed", Range(-20, 20)) = 4.5 //75
|
||||
_HologramMinAlpha("Min Alpha", Range(0, 1)) = 0.1 //76
|
||||
_HologramMaxAlpha("Max Alpha", Range(0, 100)) = 0.75 //77
|
||||
|
||||
_ChromAberrAmount("ChromAberr Amount", Range(0, 1)) = 1 //78
|
||||
_ChromAberrAlpha("ChromAberr Alpha", Range(0, 1)) = 0.4 //79
|
||||
|
||||
_GlitchAmount("Glitch Amount", Range(0, 20)) = 3 //80
|
||||
|
||||
_FlickerPercent("Flicker Percent", Range(0, 1)) = 0.05 //81
|
||||
_FlickerFreq("Flicker Frequency", Range(0, 5)) = 0.2 //82
|
||||
_FlickerAlpha("Flicker Alpha", Range(0, 1)) = 0 //83
|
||||
|
||||
_ShadowX("Shadow X Axis", Range(-0.5, 0.5)) = 0.1 //84
|
||||
_ShadowY("Shadow Y Axis", Range(-0.5, 0.5)) = -0.05 //85
|
||||
_ShadowAlpha("Shadow Alpha", Range(0, 1)) = 0.5 //86
|
||||
_ShadowColor("Shadow Color", Color) = (0, 0, 0, 1) //87
|
||||
|
||||
_HandDrawnAmount("Hand Drawn Amount", Range(0, 20)) = 10 //88
|
||||
_HandDrawnSpeed("Hand Drawn Speed", Range(1, 15)) = 5 //89
|
||||
|
||||
_GrassSpeed("Speed", Range(0,50)) = 2 //90
|
||||
_GrassWind("Bend amount", Range(0,50)) = 20 //91
|
||||
[Space]
|
||||
[Toggle()] _GrassManualToggle("Manually animated?", float) = 0 //92
|
||||
_GrassManualAnim("Manual Anim Value", Range(-1,1)) = 1 //93
|
||||
|
||||
_WaveAmount("Wave Amount", Range(0, 25)) = 7 //94
|
||||
_WaveSpeed("Wave Speed", Range(0, 25)) = 10 //95
|
||||
_WaveStrength("Wave Strength", Range(0, 25)) = 7.5 //96
|
||||
_WaveX("Wave X Axis", Range(0, 1)) = 0 //97
|
||||
_WaveY("Wave Y Axis", Range(0, 1)) = 0.5 //98
|
||||
|
||||
_RectSize("Rect Size", Range(1, 4)) = 1 //99
|
||||
|
||||
_OffsetUvX("X axis", Range(-1, 1)) = 0 //100
|
||||
_OffsetUvY("Y axis", Range(-1, 1)) = 0 //101
|
||||
|
||||
_ClipUvLeft("Clipping Left", Range(0, 1)) = 0 //102
|
||||
_ClipUvRight("Clipping Right", Range(0, 1)) = 0 //103
|
||||
_ClipUvUp("Clipping Up", Range(0, 1)) = 0 //104
|
||||
_ClipUvDown("Clipping Down", Range(0, 1)) = 0 //105
|
||||
|
||||
_TextureScrollXSpeed("Speed X Axis", Range(-5, 5)) = 1 //106
|
||||
_TextureScrollYSpeed("Speed Y Axis", Range(-5, 5)) = 0 //107
|
||||
|
||||
_ZoomUvAmount("Zoom Amount", Range(0.1, 5)) = 0.5 //108
|
||||
|
||||
[NoScaleOffset]_DistortTex("Distortion Texture", 2D) = "white" {} //109
|
||||
_DistortAmount("Distortion Amount", Range(0,2)) = 0.5 //110
|
||||
_DistortTexXSpeed("Scroll speed X", Range(-50,50)) = 5 //111
|
||||
_DistortTexYSpeed("Scroll speed Y", Range(-50,50)) = 5 //112
|
||||
|
||||
_TwistUvAmount("Twist Amount", Range(0, 3.1416)) = 1 //113
|
||||
_TwistUvPosX("Twist Pos X Axis", Range(0, 1)) = 0.5 //114
|
||||
_TwistUvPosY("Twist Pos Y Axis", Range(0, 1)) = 0.5 //115
|
||||
_TwistUvRadius("Twist Radius", Range(0, 3)) = 0.75 //116
|
||||
|
||||
_RotateUvAmount("Rotate Angle(radians)", Range(0, 6.2831)) = 0 //117
|
||||
|
||||
_FishEyeUvAmount("Fish Eye Amount", Range(0, 0.5)) = 0.35 //118
|
||||
|
||||
_PinchUvAmount("Pinch Amount", Range(0, 0.5)) = 0.35 //119
|
||||
|
||||
_ShakeUvSpeed("Shake Speed", Range(0, 20)) = 2.5 //120
|
||||
_ShakeUvX("X Multiplier", Range(0, 5)) = 1.5 //121
|
||||
_ShakeUvY("Y Multiplier", Range(0, 5)) = 1 //122
|
||||
|
||||
_ColorChangeTolerance("Tolerance", Range(0, 1)) = 0.25 //123
|
||||
_ColorChangeTarget("Color to change", Color) = (1, 0, 0, 1) //124
|
||||
[HDR] _ColorChangeNewCol("New Color", Color) = (1, 1, 0, 1) //125
|
||||
_ColorChangeLuminosity("New Color Luminosity", Range(0, 1)) = 0.0 //126
|
||||
|
||||
_RoundWaveStrength("Wave Strength", Range(0, 1)) = 0.7 //127
|
||||
_RoundWaveSpeed("Wave Speed", Range(0, 5)) = 2 //128
|
||||
|
||||
[Toggle()] _BillboardY("Billboard on both axis?", float) = 0 //129
|
||||
_ZWrite ("Depth Write", Float) = 0.0 // 130
|
||||
|
||||
_MySrcMode ("SrcMode", Float) = 5 // 131
|
||||
_MyDstMode ("DstMode", Float) = 10 // 132
|
||||
|
||||
_ShineColor("Shine Color", Color) = (1,1,1,1) // 133
|
||||
_ShineLocation("Shine Location", Range(0,1)) = 0.5 // 134
|
||||
_ShineRotate("Rotate Angle(radians)", Range(0, 6.2831)) = 0 //135
|
||||
_ShineWidth("Shine Width", Range(0.05,1)) = 0.1 // 136
|
||||
_ShineGlow("Shine Glow", Range(0,100)) = 1 // 137
|
||||
[NoScaleOffset] _ShineMask("Shine Mask", 2D) = "white" {} // 138
|
||||
|
||||
_GlitchSize("Glitch Size", Range(0.25, 5)) = 1 //139
|
||||
_HologramStripeColor("Stripes Color", Color) = (0,1,1,1) //140
|
||||
_GradBoostX("Boost X axis", Range(0.1, 5)) = 1.2 //141
|
||||
_GradBoostY("Boost Y axis", Range(0.1, 5)) = 1.2 //142
|
||||
[Toggle()] _GradIsRadial("Radial Gradient?", float) = 0 //143
|
||||
_AlphaRoundThreshold("Round Threshold", Range(0.005, 1.0)) = 0.5 //144
|
||||
_GrassRadialBend("Radial Bend", Range(0.0, 5.0)) = 0.1 //145
|
||||
|
||||
_ColorChangeTolerance2("Tolerance 2", Range(0, 1)) = 0.25 //146
|
||||
_ColorChangeTarget2("Color to change 2", Color) = (1, 0, 0, 1) //147
|
||||
[HDR] _ColorChangeNewCol2("New Color 2", Color) = (1, 1, 0, 1) //148
|
||||
_ColorChangeTolerance3("Tolerance 3", Range(0, 1)) = 0.25 //149
|
||||
_ColorChangeTarget3("Color to change 3", Color) = (1, 0, 0, 1) //150
|
||||
[HDR] _ColorChangeNewCol3("New Color 3", Color) = (1, 1, 0, 1) //151
|
||||
|
||||
_Contrast ("Contrast", Range(0, 6)) = 1 // 152
|
||||
_Brightness ("Brightness", Range(-1, 1)) = 0 // 153
|
||||
|
||||
_ColorSwapBlend ("Color Swap Blend", Range(0, 1)) = 1 // 154
|
||||
_ColorRampBlend ("Color Ramp Blend", Range(0, 1)) = 1 // 155
|
||||
_GreyscaleBlend ("Greyscale Blend", Range(0, 1)) = 1 // 156
|
||||
_GhostBlend ("Ghost Blend", Range(0, 1)) = 1 // 157
|
||||
_HologramBlend ("Hologram Blend", Range(0, 1)) = 1 // 158
|
||||
|
||||
[AllIn1ShaderGradient] _ColorRampTexGradient("Color ramp Gradient", 2D) = "white" {} //159
|
||||
|
||||
[NoScaleOffset]_OverlayTex("Overlay Texture", 2D) = "white" {} //160
|
||||
_OverlayColor("Overlay Color", Color) = (1, 1, 1, 1) //161
|
||||
_OverlayGlow("Overlay Glow", Range(0,25)) = 1 // 162
|
||||
_OverlayBlend("Overlay Blend", Range(0, 1)) = 1 // 163
|
||||
|
||||
_RadialStartAngle("Radial Start Angle", Range(0, 360)) = 90 //164
|
||||
_RadialClip("Radial Clip", Range(0, 360)) = 45 //165
|
||||
_RadialClip2("Radial Clip 2", Range(0, 360)) = 0 //166
|
||||
|
||||
_WarpStrength("Warp Strength", Range(0, 0.1)) = 0.025 //167
|
||||
_WarpSpeed("Warp Speed", Range(0, 25)) = 8 //168
|
||||
_WarpScale("Warp Scale", Range(0.05, 3)) = 0.5 //169
|
||||
|
||||
_OverlayTextureScrollXSpeed("Speed X Axis", Range(-5, 5)) = 0.25 //170
|
||||
_OverlayTextureScrollYSpeed("Speed Y Axis", Range(-5, 5)) = 0.25 //171
|
||||
|
||||
_MaskTex("Lighting Mask", 2D) = "white" {} //172
|
||||
_LitAmount("Lit Amount", Range(0,1)) = 1 //173
|
||||
_NormalMap("Normal Map", 2D) = "bump" {} //174
|
||||
_NormalStrength("Normal Strength", Range(0,10)) = 1 //175
|
||||
[Toggle()] _GlowAffectLight("Glow affects light", Float) = 1 //176
|
||||
|
||||
|
||||
/**/
|
||||
_MainTex_ScaleAndTiling("Main Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //177
|
||||
_FadeTex_ScaleAndTiling("Fade Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //178
|
||||
_FadeBurnTex_ScaleAndTiling("Fade Burn Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //179
|
||||
_OutlineTex_ScaleAndTiling("Outline Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //180
|
||||
_OutlineDistortTex_ScaleAndTiling("Outline Distort Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //181
|
||||
_DistortTex_ScaleAndTiling("Distort Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //182
|
||||
_OverlayTex_ScaleAndTiling("Overlay Tex - Scale and Tiling", Vector) = (1, 1, 0, 0) //183
|
||||
|
||||
_GlitchSpeed("Glitch Speed", Range(0.0, 100)) = 20 //184
|
||||
/**/
|
||||
|
||||
|
||||
_ZTestMode ("Z Test Mode", Float) = 4
|
||||
_CullingOption ("Culling Option", float) = 0
|
||||
|
||||
[HideInInspector] _MinXUV("_MinXUV", Range(0, 1)) = 0.0
|
||||
[HideInInspector] _MaxXUV("_MaxXUV", Range(0, 1)) = 1.0
|
||||
[HideInInspector] _MinYUV("_MinYUV", Range(0, 1)) = 0.0
|
||||
[HideInInspector] _MaxYUV("_MaxYUV", Range(0, 1)) = 1.0
|
||||
[HideInInspector] _RandomSeed("_MaxYUV", Range(0, 10000)) = 0.0
|
||||
_EditorDrawers("Editor Drawers", Int) = 14
|
||||
}
|
||||
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.universal" : "[12.0,17.2]"
|
||||
}
|
||||
|
||||
Tags {"Queue" = "Transparent" "RenderType" = "Transparent" "RenderPipeline" = "UniversalPipeline" "CanUseSpriteAtlas" = "True" "PreviewType" = "Plane" "RenderPipeline"="UniversalPipeline"}
|
||||
Blend [_MySrcMode] [_MyDstMode]
|
||||
Cull Off
|
||||
ZWrite [_ZWrite]
|
||||
ZTest [_ZTestMode]
|
||||
|
||||
Pass //Main Light Shapes pass
|
||||
{
|
||||
Name "Main Pass"
|
||||
Tags { "LightMode" = "Universal2D" }
|
||||
|
||||
HLSLPROGRAM
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
#if UNITY_VERSION >= 202230
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.hlsl"
|
||||
#endif
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl"
|
||||
|
||||
#pragma multi_compile_instancing
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_0 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_1 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_2 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_3 __
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_0
|
||||
SHAPE_LIGHT(0)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_1
|
||||
SHAPE_LIGHT(1)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_2
|
||||
SHAPE_LIGHT(2)
|
||||
#endif
|
||||
|
||||
#if USE_SHAPE_LIGHT_TYPE_3
|
||||
SHAPE_LIGHT(3)
|
||||
#endif
|
||||
|
||||
#pragma vertex CombinedShapeLightVertex
|
||||
#pragma fragment CombinedShapeLightFragment
|
||||
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Structs.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_CommonFunctions.hlsl"
|
||||
#include_with_pragmas "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_ShaderFeatures.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Properties.hlsl"
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/CombinedShapeLightShared.hlsl"
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_VertexPass.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_FragmentPass.hlsl"
|
||||
|
||||
|
||||
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass //Normal Mapping
|
||||
{
|
||||
Name "Normal Pass"
|
||||
Tags { "LightMode" = "NormalsRendering" }
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma vertex NormalsRenderingVertex
|
||||
#pragma fragment NormalsRenderingFragment
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#if UNITY_VERSION >= 202230
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.hlsl"
|
||||
#endif
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/NormalsRenderingShared.hlsl"
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Structs.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_CommonFunctions.hlsl"
|
||||
#include_with_pragmas "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_ShaderFeatures.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Properties.hlsl"
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_NormalsRenderingVertexPass.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_NormalsRenderingFragmentPass.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SubShader
|
||||
{
|
||||
PackageRequirements
|
||||
{
|
||||
"com.unity.render-pipelines.universal" : "17.3"
|
||||
}
|
||||
|
||||
Tags {"Queue" = "Transparent" "RenderType" = "Transparent" "RenderPipeline" = "UniversalPipeline" "CanUseSpriteAtlas" = "True" "PreviewType" = "Plane" "RenderPipeline"="UniversalPipeline"}
|
||||
Blend [_MySrcMode] [_MyDstMode]
|
||||
Cull Off
|
||||
ZWrite [_ZWrite]
|
||||
ZTest [_ZTestMode]
|
||||
|
||||
Pass //Main Light Shapes pass
|
||||
{
|
||||
Name "Main Pass"
|
||||
|
||||
Tags { "LightMode" = "Universal2D" }
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma vertex CombinedShapeLightVertex
|
||||
#pragma fragment CombinedShapeLightFragment
|
||||
|
||||
#pragma multi_compile_instancing
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_0 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_1 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_2 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_3 __
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/CombinedShapeLightShared.hlsl"
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Structs.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_CommonFunctions.hlsl"
|
||||
#include_with_pragmas "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_ShaderFeatures.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Properties.hlsl"
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_VertexPass.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_FragmentPass.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass //Normal Mapping
|
||||
{
|
||||
Name "Normal Pass"
|
||||
|
||||
Tags { "LightMode" = "NormalsRendering" }
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma vertex NormalsRenderingVertex
|
||||
#pragma fragment NormalsRenderingFragment
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/NormalsRenderingShared.hlsl"
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Structs.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_CommonFunctions.hlsl"
|
||||
#include_with_pragmas "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_ShaderFeatures.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Properties.hlsl"
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_NormalsRenderingVertexPass.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_NormalsRenderingFragmentPass.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass //Universal Forward
|
||||
{
|
||||
Name "Universal Forward"
|
||||
|
||||
Tags { "LightMode" = "UniversalForward" "Queue"="Transparent" "RenderType"="Transparent"}
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma vertex CombinedShapeLightVertex
|
||||
#pragma fragment CombinedShapeLightFragment
|
||||
|
||||
#pragma multi_compile_instancing
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_0 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_1 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_2 __
|
||||
#pragma multi_compile USE_SHAPE_LIGHT_TYPE_3 __
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/CombinedShapeLightShared.hlsl"
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Structs.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_CommonFunctions.hlsl"
|
||||
#include_with_pragmas "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_ShaderFeatures.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Properties.hlsl"
|
||||
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_VertexPass.hlsl"
|
||||
#include "ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_FragmentPass.hlsl"
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
|
||||
//FallBack "AllIn1SpriteShader/AllIn1SpriteShader"
|
||||
CustomEditor "AllIn1SpriteShader.AllIn12DRendererMaterialInspector"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 202ffec9202f22e478034613d6beb49c
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/AllIn1Urp2dRenderer.shader
|
||||
uploadId: 857600
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab83761dc46d94e4e90385302b0cd179
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+1382
File diff suppressed because it is too large
Load Diff
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 906fe447de9ad3b4e8d21d6ba60deb8a
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: ed1b96e11e9064957833ce8c01da6f92, type: 3}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader.surfshader
|
||||
uploadId: 857600
|
||||
+16487
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 399eb10a7a397d147aedd61cb363c5b0
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_HDRP2019.txt
|
||||
uploadId: 857600
|
||||
+25121
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a647821724afdce49a1ba80aff36898d
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_HDRP2020.txt
|
||||
uploadId: 857600
|
||||
+24976
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5e970f81e60df04c8f073f570232b06
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_HDRP2021.txt
|
||||
uploadId: 857600
|
||||
+25805
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e1b3d9455d4c4b41ae7fe2ce00204de
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_HDRP2022.txt
|
||||
uploadId: 857600
|
||||
+25856
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c397c4395866b3f43a53dfd559528372
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_HDRP2023.txt
|
||||
uploadId: 857600
|
||||
+17401
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d8afde0e2ea785468f09f3f58cf5803
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_Standard.txt
|
||||
uploadId: 857600
|
||||
+4828
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6a5f34c034fbd04db605bdcc50b16cd
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_URP2019.txt
|
||||
uploadId: 857600
|
||||
+4882
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b690ab8311c671458478ca7f852b720
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_URP2020.txt
|
||||
uploadId: 857600
|
||||
+4974
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf43ea038b1b8bc40bb9018effdc2e94
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_URP2021.txt
|
||||
uploadId: 857600
|
||||
+5001
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce8330b40cde2f94c9cb20367e34bd3a
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_URP2022.txt
|
||||
uploadId: 857600
|
||||
+5252
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3fd67a7feee2e848b1efa22e4d324c0
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLitTransparent_BetterShader_URP2023.txt
|
||||
uploadId: 857600
|
||||
+1384
File diff suppressed because it is too large
Load Diff
+17
@@ -0,0 +1,17 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 325f1e8448719734a8a423b1dec4f03a
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: ed1b96e11e9064957833ce8c01da6f92, type: 3}
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader.surfshader
|
||||
uploadId: 857600
|
||||
+16505
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e25ae0d994e4df1408dc1cbf96a8adf3
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_HDRP2019.txt
|
||||
uploadId: 857600
|
||||
+25148
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8403357ed2de81489de24747f4c4e40
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_HDRP2020.txt
|
||||
uploadId: 857600
|
||||
+25003
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5545a9e4fbadc354c82bb73fb11b0af7
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_HDRP2021.txt
|
||||
uploadId: 857600
|
||||
+25832
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f92b26827dd1dcc45b0edccd67279b1d
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_HDRP2022.txt
|
||||
uploadId: 857600
|
||||
+25883
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a1f8afb0017813b4aac0394c15f9f2a5
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_HDRP2023.txt
|
||||
uploadId: 857600
|
||||
+17416
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0469e88f445d184f88bc25be7464884
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_Standard.txt
|
||||
uploadId: 857600
|
||||
+4834
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a9baa42d2bd0f2418209ef9ad138f0e
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_URP2019.txt
|
||||
uploadId: 857600
|
||||
+4888
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa67532b31576e249a3d2c13ec2c0cf8
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_URP2020.txt
|
||||
uploadId: 857600
|
||||
+4980
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69090a1deecc05842bc9e7d8d9f7ae6e
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_URP2021.txt
|
||||
uploadId: 857600
|
||||
+5007
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a76ffb960fb45246965a6e47eeb1a66
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_URP2022.txt
|
||||
uploadId: 857600
|
||||
+5258
File diff suppressed because it is too large
Load Diff
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a84fbc897c8eaaf40b7075fd17cdbb7f
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/AllIn1SpriteShaderLit_BetterShader_URP2023.txt
|
||||
uploadId: 857600
|
||||
@@ -0,0 +1,31 @@
|
||||
# BetterShaders_AllIn1Sprite Shader
|
||||
|
||||
This shader was created using Better Shaders, a Unity asset by Jason Booth that simplifies cross-pipeline shader development.
|
||||
|
||||
## Usage
|
||||
- If you own Better Shaders: You can modify the shader's source code: AllIn1SpriteShaderLit_BetterShader.surfshader
|
||||
- If you don't own Better Shaders: A pre-compiled version matching your current Render Pipeline and Unity version will be automatically set up.
|
||||
|
||||
## Why Better Shaders?
|
||||
Better Shaders was used because Unity doesn't have an easy way to create hand written lit shaders compatible across all render pipelines.
|
||||
|
||||
## About Better Shaders
|
||||
Better Shaders streamlines shader creation by:
|
||||
- Enabling Unity-like shader writing
|
||||
- Auto-compiling for various pipelines
|
||||
- Allowing shader stacking
|
||||
- Functioning like native Unity shaders
|
||||
|
||||
For more information or to purchase Better Shaders, visit:
|
||||
[Better Shaders on Unity Asset Store](https://assetstore.unity.com/packages/tools/visual-scripting/better-shaders-2022-standard-urp-hdrp-244057)
|
||||
|
||||
## What are all the .txt shaders and how to export them?
|
||||
The .txt shaders are the pipeline-specific source code for the shader. You can export them by:
|
||||
1. Selecting AllIn1SpriteShaderLit_BetterShader.surfshader
|
||||
2. Export all shaders as text assets
|
||||
|
||||
Doing this will cause some URP and HDRP shaders material inspectors properties to be in the incorrect order. To fix this, you can:
|
||||
1. Localize the Better Shaders2022 folder
|
||||
2. Inside you'll see the PipelineTemplates folder
|
||||
3. There, find your pipeline's template
|
||||
4. Make sure that "%PROPERTIES%" is right under "Properties{"
|
||||
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4026e642526007b45b74a1f1064e6ba2
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/LitShaders/README.txt
|
||||
uploadId: 857600
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8c7136836fcfb3448e5f1822a7192d9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 786a2bacb5f53844392f7846e0ff411c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
#ifndef ALLIN1SPRITESHADER_2DRENDERER_COMMONFUNCTIONS
|
||||
#define ALLIN1SPRITESHADER_2DRENDERER_COMMONFUNCTIONS
|
||||
|
||||
//Prevent Unity warnings that are not relevant for this shader-------------------
|
||||
#pragma warning (disable : 3571) // pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
|
||||
#pragma warning (disable : 4008) // floating point division by zero
|
||||
#pragma warning (disable : 3206) // implicit truncation of vector type
|
||||
//BLURS-------------------------------------------------------------------------
|
||||
|
||||
|
||||
#define ALLIN1_SAMPLE_TEXTURE_2D(texName, uv) SAMPLE_TEXTURE2D(texName, sampler##texName, uv)
|
||||
|
||||
half4 Blur(half2 uv, Texture2D source, SamplerState texSampler, half Intensity)
|
||||
{
|
||||
const half2 texelSize = 1.0 / _ScreenParams.xy;
|
||||
const half4 color = SAMPLE_TEXTURE2D(source, texSampler, uv);
|
||||
const half2 offset = Intensity * texelSize;
|
||||
|
||||
half4 accumulatedColor = color;
|
||||
half accumulatedWeight = 1.0;
|
||||
for (int x = -1; x <= 1; x++)
|
||||
{
|
||||
for (int y = -1; y <= 1; y++)
|
||||
{
|
||||
const half2 sampleUV = uv + half2(x, y) * offset;
|
||||
const half4 sampleColor = SAMPLE_TEXTURE2D(source, texSampler, sampleUV);
|
||||
|
||||
accumulatedColor += sampleColor;
|
||||
accumulatedWeight += 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
half4 blurredColor = accumulatedColor / accumulatedWeight;
|
||||
return blurredColor;
|
||||
}
|
||||
|
||||
half BlurHD_G(half bhqp, half x)
|
||||
{
|
||||
return exp(-(x * x) / (2.0 * bhqp * bhqp));
|
||||
}
|
||||
half4 BlurHD(half2 uv, Texture2D source, SamplerState texSampler, half BlurAmount, half xScale, half yScale)
|
||||
{
|
||||
int iterations = 16;
|
||||
int halfIterations = iterations / 2;
|
||||
half sigmaX = 0.1 + BlurAmount * 0.5;
|
||||
half sigmaY = sigmaX;
|
||||
half total = 0.0;
|
||||
half4 ret = half4(0, 0, 0, 0);
|
||||
for (int iy = 0; iy < iterations; ++iy)
|
||||
{
|
||||
half fy = BlurHD_G(sigmaY, half(iy) -half(halfIterations));
|
||||
half offsetY = half(iy - halfIterations) * 0.00390625 * xScale;
|
||||
for (int ix = 0; ix < iterations; ++ix)
|
||||
{
|
||||
half fx = BlurHD_G(sigmaX, half(ix) - half(halfIterations));
|
||||
half offsetX = half(ix - halfIterations) * 0.00390625 * yScale;
|
||||
total += fx * fy;
|
||||
ret += SAMPLE_TEXTURE2D(source, texSampler, uv + half2(offsetX, offsetY)) * fx * fy;
|
||||
}
|
||||
}
|
||||
return ret / total;
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
half rand(half offset, half2 seed) {
|
||||
return (frac(sin(dot(seed, half2(12.9898, 78.233))) * 43758.5453) + offset) % 1.0;
|
||||
}
|
||||
|
||||
half rand2(half2 seed, half offset, half speed) {
|
||||
return (frac(sin(dot(seed * floor(50 + (_Time.x % 1.0) * 12. * speed), half2(127.1, 311.7))) * 43758.5453123) + offset) % 1.0;
|
||||
}
|
||||
|
||||
half rand2CustomTime(half offset, half2 seed, half customTime, half speed) {
|
||||
return (frac(sin(dot(seed * floor(50 + (customTime % 1.0) * 12. * speed), half2(127.1, 311.7))) * 43758.5453123) + offset) % 1.0;
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
half RemapFloat(half inValue, half inMin, half inMax, half outMin, half outMax){
|
||||
return outMin + (inValue - inMin) * (outMax - outMin) / (inMax - inMin);
|
||||
}
|
||||
|
||||
half3 GetPixel(in int offsetX, in int offsetY, half2 uv, Texture2D tex, SamplerState texSampler, float4 texelSize)
|
||||
{
|
||||
half2 correctedUV = (uv + half2(offsetX * texelSize.x, offsetY * texelSize.y));
|
||||
half3 res = SAMPLE_TEXTURE2D(tex, texSampler, correctedUV).rgb;
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif //ALLIN1SPRITESHADER_2DRENDERER_COMMONFUNCTIONS
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b271c3be2c8bda1448755707cbb814cd
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_CommonFunctions.hlsl
|
||||
uploadId: 857600
|
||||
+588
@@ -0,0 +1,588 @@
|
||||
#ifndef ALLIN1SPRITESHADER_2DRENDERER_FRAGMENTPASS
|
||||
#define ALLIN1SPRITESHADER_2DRENDERER_FRAGMENTPASS
|
||||
|
||||
half4 CombinedShapeLightFragment(v2f i) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(i);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||||
half randomSeed = _RandomSeed;
|
||||
|
||||
float texWidth;
|
||||
float texHeight;
|
||||
_MainTex.GetDimensions(texWidth, texHeight);
|
||||
float4 texelSize = float4(1.0 / texWidth, 1 / texHeight, texWidth, texHeight);
|
||||
|
||||
float2 uvRect = i.uv;
|
||||
half2 center = half2(0.5, 0.5);
|
||||
#if ATLAS_ON
|
||||
center = half2((_MaxXUV + _MinXUV) / 2.0, (_MaxYUV + _MinYUV) / 2.0);
|
||||
uvRect = half2((i.uv.x - _MinXUV) / (_MaxXUV - _MinXUV), (i.uv.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half2 centerTiled = half2(center.x * _MainTex_ScaleAndTiling.x, center.y * _MainTex_ScaleAndTiling.y);
|
||||
|
||||
#if CLIPPING_ON
|
||||
half2 tiledUv = half2(i.uv.x / _MainTex_ScaleAndTiling.x, i.uv.y / _MainTex_ScaleAndTiling.y);
|
||||
#if ATLAS_ON
|
||||
tiledUv = half2((tiledUv.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUv.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
clip((1 - _ClipUvUp) - tiledUv.y);
|
||||
clip(tiledUv.y - _ClipUvDown);
|
||||
clip((1 - _ClipUvRight) - tiledUv.x);
|
||||
clip(tiledUv.x - _ClipUvLeft);
|
||||
#endif
|
||||
|
||||
#if RADIALCLIPPING_ON
|
||||
half2 tiledUv2 = half2(i.uv.x / _MainTex_ScaleAndTiling.x, i.uv.y / _MainTex_ScaleAndTiling.y);
|
||||
#if ATLAS_ON
|
||||
tiledUv2 = half2((tiledUv2.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUv2.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half startAngle = _RadialStartAngle - _RadialClip;
|
||||
half endAngle = _RadialStartAngle + _RadialClip2;
|
||||
half offset0 = clamp(0, 360, startAngle + 360);
|
||||
half offset360 = clamp(0, 360, endAngle - 360);
|
||||
half2 atan2Coord = half2(lerp(-1, 1, tiledUv2.x), lerp(-1, 1, tiledUv2.y));
|
||||
half atanAngle = atan2(atan2Coord.y, atan2Coord.x) * 57.3; // angle in degrees
|
||||
if(atanAngle < 0) atanAngle = 360 + atanAngle;
|
||||
if(atanAngle >= startAngle && atanAngle <= endAngle) discard;
|
||||
if(atanAngle <= offset360) discard;
|
||||
if(atanAngle >= offset0) discard;
|
||||
#endif
|
||||
|
||||
#if TEXTURESCROLL_ON && ATLAS_ON
|
||||
i.uv = half2(_MinXUV + ((_MaxXUV - _MinXUV) * (abs(((_Time.y + randomSeed) * _TextureScrollXSpeed) + uvRect.x) % 1)),
|
||||
_MinYUV + ((_MaxYUV - _MinYUV) * (abs(((_Time.y + randomSeed) * _TextureScrollYSpeed) + uvRect.y) % 1)));
|
||||
#endif
|
||||
|
||||
#if OFFSETUV_ON
|
||||
#if ATLAS_ON
|
||||
i.uv = half2(_MinXUV + ((_MaxXUV - _MinXUV) * (abs((_OffsetUvX + uvRect.x) % 1))),
|
||||
_MinYUV + ((_MaxYUV - _MinYUV) * (abs(_OffsetUvY + uvRect.y) % 1)));
|
||||
#else
|
||||
i.uv += half2(_OffsetUvX, _OffsetUvY);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if POLARUV_ON
|
||||
i.uv = half2(atan2(i.uv.y, i.uv.x) / (2.0f * 3.141592653589f), length(i.uv));
|
||||
i.uv *= _MainTex_ScaleAndTiling.xy;
|
||||
#endif
|
||||
|
||||
#if TWISTUV_ON
|
||||
#if ATLAS_ON
|
||||
_TwistUvPosX = ((_MaxXUV - _MinXUV) * _TwistUvPosX) + _MinXUV;
|
||||
_TwistUvPosY = ((_MaxYUV - _MinYUV) * _TwistUvPosY) + _MinYUV;
|
||||
#endif
|
||||
half2 tempUv = i.uv - half2(_TwistUvPosX * _MainTex_ScaleAndTiling.x, _TwistUvPosY * _MainTex_ScaleAndTiling.y);
|
||||
_TwistUvRadius *= (_MainTex_ScaleAndTiling.x + _MainTex_ScaleAndTiling.y) / 2;
|
||||
half percent = (_TwistUvRadius - length(tempUv)) / _TwistUvRadius;
|
||||
half theta = percent * percent * (2.0 * sin(_TwistUvAmount)) * 8.0;
|
||||
half s = sin(theta);
|
||||
half c = cos(theta);
|
||||
half beta = max(sign(_TwistUvRadius - length(tempUv)), 0.0);
|
||||
tempUv = half2(dot(tempUv, half2(c, -s)), dot(tempUv, half2(s, c))) * beta + tempUv * (1 - beta);
|
||||
tempUv += half2(_TwistUvPosX * _MainTex_ScaleAndTiling.x, _TwistUvPosY * _MainTex_ScaleAndTiling.y);
|
||||
i.uv = tempUv;
|
||||
#endif
|
||||
|
||||
#if FISHEYE_ON
|
||||
half bind = length(centerTiled);
|
||||
half2 dF = i.uv - centerTiled;
|
||||
half dFlen = length(dF);
|
||||
half fishInt = (3.14159265359 / bind) * (_FishEyeUvAmount + 0.001);
|
||||
i.uv = centerTiled + (dF / (max(0.0001, dFlen))) * tan(dFlen * fishInt) * bind / tan(bind * fishInt);
|
||||
#endif
|
||||
|
||||
#if PINCH_ON
|
||||
half2 dP = i.uv - centerTiled;
|
||||
half pinchInt = (3.141592 / length(centerTiled)) * (-_PinchUvAmount + 0.001);
|
||||
i.uv = centerTiled + normalize(dP) * atan(length(dP) * -pinchInt * 10.0) * 0.5 / atan(-pinchInt * 5);
|
||||
#endif
|
||||
|
||||
#if ZOOMUV_ON
|
||||
i.uv -= centerTiled;
|
||||
i.uv = i.uv * _ZoomUvAmount;
|
||||
i.uv += centerTiled;
|
||||
#endif
|
||||
|
||||
#if DOODLE_ON
|
||||
half2 uvCopy = uvRect;
|
||||
_HandDrawnSpeed = (floor((_Time.x + randomSeed) * 20 * _HandDrawnSpeed) / _HandDrawnSpeed) * _HandDrawnSpeed;
|
||||
uvCopy.x = sin((uvCopy.x * _HandDrawnAmount + _HandDrawnSpeed) * 4);
|
||||
uvCopy.y = cos((uvCopy.y * _HandDrawnAmount + _HandDrawnSpeed) * 4);
|
||||
i.uv = lerp(i.uv, i.uv + uvCopy, 0.0005 * _HandDrawnAmount);
|
||||
#endif
|
||||
|
||||
#if SHAKEUV_ON
|
||||
half xShake = sin((_Time.x + randomSeed) * _ShakeUvSpeed * 50) * _ShakeUvX;
|
||||
half yShake = cos((_Time.x + randomSeed) * _ShakeUvSpeed * 50) * _ShakeUvY;
|
||||
i.uv += half2(xShake * 0.012, yShake * 0.01);
|
||||
#endif
|
||||
|
||||
#if RECTSIZE_ON
|
||||
i.uv = i.uv.xy * (_RectSize).xx + (((-_RectSize * 0.5) + 0.5)).xx;
|
||||
#endif
|
||||
|
||||
#if DISTORT_ON
|
||||
#if ATLAS_ON
|
||||
i.uvDistTex.x = i.uvDistTex.x * (1 / (_MaxXUV - _MinXUV));
|
||||
i.uvDistTex.y = i.uvDistTex.y * (1 / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
i.uvDistTex.x += ((_Time.x + randomSeed) * _DistortTexXSpeed) % 1;
|
||||
i.uvDistTex.y += ((_Time.x + randomSeed) * _DistortTexYSpeed) % 1;
|
||||
half distortAmnt = (ALLIN1_SAMPLE_TEXTURE_2D(_DistortTex, i.uvDistTex).r - 0.5) * 0.2 * _DistortAmount;
|
||||
i.uv.x += distortAmnt;
|
||||
i.uv.y += distortAmnt;
|
||||
#endif
|
||||
|
||||
#if WARP_ON
|
||||
half2 warpUv = half2(i.uv.x / _MainTex_ScaleAndTiling.x, i.uv.y / _MainTex_ScaleAndTiling.y);
|
||||
#if ATLAS_ON
|
||||
warpUv = half2((warpUv.x - _MinXUV) / (_MaxXUV - _MinXUV), (warpUv.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
const float tau = 6.283185307179586;
|
||||
float xWarp = (_Time.y + randomSeed) * _WarpSpeed + warpUv.x * tau / _WarpScale;
|
||||
float yWarp = (_Time.y + randomSeed) * _WarpSpeed + warpUv.y * tau / _WarpScale;
|
||||
float2 warp = float2(sin(xWarp), sin(yWarp)) * _WarpStrength;
|
||||
i.uv += warp;
|
||||
#endif
|
||||
|
||||
#if WAVEUV_ON
|
||||
float2 uvWave = half2(_WaveX * _MainTex_ScaleAndTiling.x, _WaveY * _MainTex_ScaleAndTiling.y) - i.uv;
|
||||
uvWave %= 1;
|
||||
#if ATLAS_ON
|
||||
uvWave = half2(_WaveX, _WaveY) - uvRect;
|
||||
#endif
|
||||
uvWave.x *= _ScreenParams.x / _ScreenParams.y;
|
||||
float waveTime = _Time.y + randomSeed;
|
||||
float angWave = (sqrt(dot(uvWave, uvWave)) * _WaveAmount) - ((waveTime * _WaveSpeed));
|
||||
i.uv = i.uv + uvWave * sin(angWave) * (_WaveStrength / 1000.0);
|
||||
#endif
|
||||
|
||||
#if ROUNDWAVEUV_ON
|
||||
half xWave = ((0.5 * _MainTex_ScaleAndTiling.x) - uvRect.x);
|
||||
half yWave = ((0.5 * _MainTex_ScaleAndTiling.y) - uvRect.y) * (texelSize.w / texelSize.z);
|
||||
half ripple = -sqrt(xWave*xWave + yWave* yWave);
|
||||
i.uv += sin((ripple + (_Time.y + randomSeed) * (_RoundWaveSpeed/10.0)) / 0.015) * (_RoundWaveStrength/10.0);
|
||||
#endif
|
||||
|
||||
#if WIND_ON
|
||||
half windOffset = sin((_Time.x + randomSeed) * _GrassSpeed * 10);
|
||||
half2 windCenter = half2(0.5, 0.1);
|
||||
#if ATLAS_ON
|
||||
windCenter.x = ((_MaxXUV - _MinXUV) * windCenter.x) + _MinXUV;
|
||||
windCenter.y = ((_MaxYUV - _MinYUV) * windCenter.y) + _MinYUV;
|
||||
#endif
|
||||
#if !MANUALWIND_ON
|
||||
i.uv.x = fmod(abs(lerp(i.uv.x, i.uv.x + (_GrassWind * 0.01 * windOffset), uvRect.y)), 1);
|
||||
#else
|
||||
i.uv.x = fmod(abs(lerp(i.uv.x, i.uv.x + (_GrassWind * 0.01 * _GrassManualAnim), uvRect.y)), 1);
|
||||
windOffset = _GrassManualAnim;
|
||||
#endif
|
||||
half2 delta = i.uv - windCenter;
|
||||
half delta2 = dot(delta.xy, delta.xy);
|
||||
half2 delta_offset = delta2 * windOffset;
|
||||
i.uv = i.uv + half2(delta.y, -delta.x) * delta_offset * _GrassRadialBend;
|
||||
#endif
|
||||
|
||||
#if TEXTURESCROLL_ON && !ATLAS_ON
|
||||
i.uv.x += ((_Time.y + randomSeed) * _TextureScrollXSpeed) % 1;
|
||||
i.uv.y += ((_Time.y + randomSeed) * _TextureScrollYSpeed) % 1;
|
||||
#endif
|
||||
|
||||
#if PIXELATE_ON
|
||||
half aspectRatio = texelSize.x / texelSize.y;
|
||||
half2 pixelSize = float2(_PixelateSize, _PixelateSize * aspectRatio);
|
||||
i.uv = floor(i.uv * pixelSize) / pixelSize;
|
||||
#endif
|
||||
|
||||
half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
|
||||
half originalAlpha = col.a;
|
||||
col *= i.color;
|
||||
#if PREMULTIPLYALPHA_ON
|
||||
col.rgb *= col.a;
|
||||
#endif
|
||||
|
||||
#if GLITCH_ON
|
||||
half2 uvGlitch = uvRect;
|
||||
uvGlitch.y -= 0.5;
|
||||
half lineNoise = pow(rand2(floor(uvGlitch * half2(24., 19.) * _GlitchSize) * 4.0, randomSeed, _GlitchSpeed), 3.0) * _GlitchAmount
|
||||
* pow(rand2(floor(uvGlitch * half2(38., 14.) * _GlitchSize) * 4.0, randomSeed, _GlitchSpeed), 3.0);
|
||||
col = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(lineNoise * 0.02 * rand2(half2(2.0, 1), randomSeed, _GlitchSpeed), 0)) * i.color;
|
||||
#endif
|
||||
|
||||
#if CHROMABERR_ON
|
||||
half4 r = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(_ChromAberrAmount/10, 0)) * i.color;
|
||||
half4 b = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(-_ChromAberrAmount/10, 0)) * i.color;
|
||||
col = half4(r.r * r.a, col.g, b.b * b.a, max(max(r.a, b.a) * _ChromAberrAlpha, col.a));
|
||||
#endif
|
||||
|
||||
#if BLUR_ON
|
||||
#if ATLAS_ON
|
||||
#if !BLURISHD_ON
|
||||
col = BlurHD(i.uv, _MainTex, sampler_MainTex, _BlurIntensity, (_MaxXUV - _MinXUV), (_MaxYUV - _MinYUV)) * i.color;
|
||||
#else
|
||||
col = Blur(i.uv, _MainTex, sampler_MainTex, _BlurIntensity * (_MaxXUV - _MinXUV)) * i.color;
|
||||
#endif
|
||||
#else
|
||||
#if !BLURISHD_ON
|
||||
col = BlurHD(i.uv, _MainTex, sampler_MainTex, _BlurIntensity, 1, 1) * i.color;
|
||||
#else
|
||||
col = Blur(i.uv, _MainTex, sampler_MainTex, _BlurIntensity) * i.color;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MOTIONBLUR_ON
|
||||
_MotionBlurAngle = _MotionBlurAngle * 3.1415926;
|
||||
#define rot(n) mul(n, half2x2(cos(_MotionBlurAngle), -sin(_MotionBlurAngle), sin(_MotionBlurAngle), cos(_MotionBlurAngle)))
|
||||
_MotionBlurDist = _MotionBlurDist * 0.005;
|
||||
#if ATLAS_ON
|
||||
_MotionBlurDist *= (_MaxXUV - _MinXUV);
|
||||
#endif
|
||||
col.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + rot(half2(-_MotionBlurDist, -_MotionBlurDist)));
|
||||
col.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + rot(half2(-_MotionBlurDist * 2, -_MotionBlurDist * 2)));
|
||||
col.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + rot(half2(-_MotionBlurDist * 3, -_MotionBlurDist * 3)));
|
||||
col.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + rot(half2(-_MotionBlurDist * 4, -_MotionBlurDist * 4)));
|
||||
col.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + rot(half2(_MotionBlurDist, _MotionBlurDist)));
|
||||
col.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + rot(half2(_MotionBlurDist * 2, _MotionBlurDist * 2)));
|
||||
col.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + rot(half2(_MotionBlurDist * 3, _MotionBlurDist * 3)));
|
||||
col.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + rot(half2(_MotionBlurDist * 4, _MotionBlurDist * 4)));
|
||||
col.rgb = col.rgb / 9;
|
||||
#endif
|
||||
|
||||
#if NEGATIVE_ON
|
||||
col.rgb = lerp(col.rgb, 1 - col.rgb, _NegativeAmount);
|
||||
#endif
|
||||
|
||||
half luminance = 0;
|
||||
#if GREYSCALE_ON && !GREYSCALEOUTLINE_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
luminance = saturate(luminance + _GreyscaleLuminosity);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _GreyscaleTintColor, _GreyscaleBlend);
|
||||
#endif
|
||||
|
||||
#if GHOST_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
half4 ghostResult;
|
||||
ghostResult.a = saturate(luminance - _GhostTransparency) * col.a;
|
||||
ghostResult.rgb = col.rgb * (luminance + _GhostColorBoost);
|
||||
col = lerp(col, ghostResult, _GhostBlend);
|
||||
#endif
|
||||
|
||||
#if INNEROUTLINE_ON
|
||||
half3 innerT = abs(GetPixel(0, _InnerOutlineThickness, i.uv, _MainTex, sampler_MainTex, texelSize) - GetPixel(0, -_InnerOutlineThickness, i.uv, _MainTex, sampler_MainTex, texelSize));
|
||||
innerT += abs(GetPixel(_InnerOutlineThickness, 0, i.uv, _MainTex, sampler_MainTex, texelSize) - GetPixel(-_InnerOutlineThickness, 0, i.uv, _MainTex, sampler_MainTex, texelSize));
|
||||
#if !ONLYINNEROUTLINE_ON
|
||||
innerT = (innerT / 2.0) * col.a * _InnerOutlineAlpha;
|
||||
col.rgb += length(innerT) * _InnerOutlineColor.rgb * _InnerOutlineGlow;
|
||||
#else
|
||||
innerT *= col.a * _InnerOutlineAlpha;
|
||||
col.rgb = length(innerT) * _InnerOutlineColor.rgb * _InnerOutlineGlow;
|
||||
col.a = step(0.3, col.r+col.g+col.b);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HITEFFECT_ON
|
||||
col.rgb = lerp(col.rgb, _HitEffectColor.rgb * _HitEffectGlow, _HitEffectBlend);
|
||||
#endif
|
||||
|
||||
#if GRADIENT_ON
|
||||
half2 tiledUvGrad = half2(uvRect.x / _MainTex_ScaleAndTiling.x, uvRect.y / _MainTex_ScaleAndTiling.y);
|
||||
#if GRADIENT2COL_ON
|
||||
_GradTopRightCol = _GradTopLeftCol;
|
||||
_GradBotRightCol = _GradBotLeftCol;
|
||||
#endif
|
||||
#if RADIALGRADIENT_ON
|
||||
half radialDist = 1 - length(tiledUvGrad - half2(0.5, 0.5));
|
||||
radialDist *= (texelSize.w / texelSize.z);
|
||||
radialDist = saturate(_GradBoostX * radialDist);
|
||||
half4 gradientResult = lerp(_GradTopLeftCol, _GradBotLeftCol, radialDist);
|
||||
#else
|
||||
half gradXLerpFactor = saturate(pow(tiledUvGrad.x, _GradBoostX));
|
||||
half4 gradientResult = lerp(lerp(_GradBotLeftCol, _GradBotRightCol, gradXLerpFactor),
|
||||
lerp(_GradTopLeftCol, _GradTopRightCol, gradXLerpFactor), saturate(pow(tiledUvGrad.y, _GradBoostY)));
|
||||
#endif
|
||||
gradientResult = lerp(col, gradientResult, _GradBlend);
|
||||
col.rgb = gradientResult.rgb * col.a;
|
||||
col.a *= gradientResult.a;
|
||||
#endif
|
||||
|
||||
#if CONTRAST_ON
|
||||
col.rgb = (col.rgb - float3(0.5, 0.5, 0.5)) * _Contrast + float3(0.5, 0.5, 0.5);
|
||||
col.rgb += _Brightness;
|
||||
#endif
|
||||
|
||||
#if COLORSWAP_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
half4 swapMask = ALLIN1_SAMPLE_TEXTURE_2D(_ColorSwapTex, i.uv);
|
||||
swapMask.rgb *= swapMask.a;
|
||||
half3 redSwap = _ColorSwapRed * swapMask.r * col.a * saturate(luminance + _ColorSwapRedLuminosity);
|
||||
half3 greenSwap = _ColorSwapGreen * swapMask.g * col.a * saturate(luminance + _ColorSwapGreenLuminosity);
|
||||
half3 blueSwap = _ColorSwapBlue * swapMask.b * col.a * saturate(luminance + _ColorSwapBlueLuminosity);
|
||||
swapMask.rgb = col.rgb * saturate(1 - swapMask.r - swapMask.g - swapMask.b);
|
||||
col.rgb = lerp(col.rgb, swapMask.rgb + redSwap + greenSwap + blueSwap, _ColorSwapBlend);
|
||||
#endif
|
||||
|
||||
#if COLORRAMP_ON && !COLORRAMPOUTLINE_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
luminance = saturate(luminance + _ColorRampLuminosity);
|
||||
#if GRADIENTCOLORRAMP_ON
|
||||
col.rgb = lerp(col.rgb, ALLIN1_SAMPLE_TEXTURE_2D(_ColorRampTexGradient, half2(luminance, 0)).rgb, _ColorRampBlend);
|
||||
#else
|
||||
col.rgb = lerp(col.rgb, ALLIN1_SAMPLE_TEXTURE_2D(_ColorRampTex, half2(luminance, 0)).rgb, _ColorRampBlend);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CHANGECOLOR_ON
|
||||
float3 currChangeColor = saturate(col.rgb);
|
||||
luminance = 0.3 * currChangeColor.r + 0.59 * currChangeColor.g + 0.11 * currChangeColor.b;
|
||||
luminance = saturate(luminance + _ColorChangeLuminosity);
|
||||
half3 dif = abs(currChangeColor - _ColorChangeTarget.rgb);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _ColorChangeNewCol.rgb,
|
||||
max(sign(1 - saturate(dif.x + dif.y + dif.z) - _ColorChangeTolerance), 0.0));
|
||||
#if CHANGECOLOR2_ON
|
||||
dif = abs(currChangeColor - _ColorChangeTarget2.rgb);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _ColorChangeNewCol2.rgb,
|
||||
max(sign(1 - saturate(dif.x + dif.y + dif.z) - _ColorChangeTolerance2), 0.0));
|
||||
#endif
|
||||
#if CHANGECOLOR3_ON
|
||||
dif = abs(currChangeColor - _ColorChangeTarget3.rgb);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _ColorChangeNewCol3.rgb,
|
||||
max(sign(1 - saturate(dif.x + dif.y + dif.z) - _ColorChangeTolerance3), 0.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if POSTERIZE_ON && !POSTERIZEOUTLINE_ON
|
||||
col.rgb = pow(col.rgb, _PosterizeGamma) * _PosterizeNumColors;
|
||||
col.rgb = floor(col.rgb) / _PosterizeNumColors;
|
||||
col.rgb = pow(col.rgb, 1.0 / _PosterizeGamma);
|
||||
#endif
|
||||
|
||||
#if HSV_ON
|
||||
half3 resultHsv = half3(col.rgb);
|
||||
half cosHsv = _HsvBright * _HsvSaturation * cos(_HsvShift * 3.14159265 / 180);
|
||||
half sinHsv = _HsvBright * _HsvSaturation * sin(_HsvShift * 3.14159265 / 180);
|
||||
resultHsv.x = (.299 * _HsvBright + .701 * cosHsv + .168 * sinHsv) * col.x
|
||||
+ (.587 * _HsvBright - .587 * cosHsv + .330 * sinHsv) * col.y
|
||||
+ (.114 * _HsvBright - .114 * cosHsv - .497 * sinHsv) * col.z;
|
||||
resultHsv.y = (.299 * _HsvBright - .299 * cosHsv - .328 * sinHsv) *col.x
|
||||
+ (.587 * _HsvBright + .413 * cosHsv + .035 * sinHsv) * col.y
|
||||
+ (.114 * _HsvBright - .114 * cosHsv + .292 * sinHsv) * col.z;
|
||||
resultHsv.z = (.299 * _HsvBright - .3 * cosHsv + 1.25 * sinHsv) * col.x
|
||||
+ (.587 * _HsvBright - .588 * cosHsv - 1.05 * sinHsv) * col.y
|
||||
+ (.114 * _HsvBright + .886 * cosHsv - .203 * sinHsv) * col.z;
|
||||
col.rgb = resultHsv;
|
||||
#endif
|
||||
|
||||
#if OVERLAY_ON
|
||||
half2 overlayUvs = i.uv;
|
||||
overlayUvs.x += ((_Time.y + randomSeed) * _OverlayTextureScrollXSpeed) % 1;
|
||||
overlayUvs.y += ((_Time.y + randomSeed) * _OverlayTextureScrollYSpeed) % 1;
|
||||
half4 overlayCol = ALLIN1_SAMPLE_TEXTURE_2D(_OverlayTex, CUSTOM_TRANSFORM_TEX(overlayUvs, _OverlayTex_ScaleAndTiling));
|
||||
overlayCol.rgb *= _OverlayColor.rgb * _OverlayGlow;
|
||||
#if !OVERLAYMULT_ON
|
||||
overlayCol.rgb *= overlayCol.a * _OverlayColor.rgb * _OverlayColor.a * _OverlayBlend;
|
||||
col.rgb += overlayCol.rgb;
|
||||
#else
|
||||
overlayCol.a *= _OverlayColor.a;
|
||||
col = lerp(col, col * overlayCol, _OverlayBlend);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//OUTLINE-------------------------------------------------------------
|
||||
#if OUTBASE_ON
|
||||
#if OUTBASEPIXELPERF_ON
|
||||
half2 destUv = half2(_OutlinePixelWidth * texelSize.x, _OutlinePixelWidth * texelSize.y);
|
||||
#else
|
||||
half2 destUv = half2(_OutlineWidth * texelSize.x * 200, _OutlineWidth * texelSize.y * 200);
|
||||
#endif
|
||||
|
||||
#if OUTDIST_ON
|
||||
i.uvOutDistTex.x += ((_Time.x + randomSeed) * _OutlineDistortTexXSpeed) % 1;
|
||||
i.uvOutDistTex.y += ((_Time.x + randomSeed) * _OutlineDistortTexYSpeed) % 1;
|
||||
#if ATLAS_ON
|
||||
i.uvOutDistTex = half2((i.uvOutDistTex.x - _MinXUV) / (_MaxXUV - _MinXUV), (i.uvOutDistTex.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half outDistortAmnt = (ALLIN1_SAMPLE_TEXTURE_2D(_OutlineDistortTex, i.uvOutDistTex).r - 0.5) * 0.2 * _OutlineDistortAmount;
|
||||
destUv.x += outDistortAmnt;
|
||||
destUv.y += outDistortAmnt;
|
||||
#endif
|
||||
|
||||
half spriteLeft = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(destUv.x, 0)).a;
|
||||
half spriteRight = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv - half2(destUv.x, 0)).a;
|
||||
half spriteBottom = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(0, destUv.y)).a;
|
||||
half spriteTop = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv - half2(0, destUv.y)).a;
|
||||
half result = spriteLeft + spriteRight + spriteBottom + spriteTop;
|
||||
|
||||
#if OUTBASE8DIR_ON
|
||||
half spriteTopLeft = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(destUv.x, destUv.y)).a;
|
||||
half spriteTopRight = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(-destUv.x, destUv.y)).a;
|
||||
half spriteBotLeft = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(destUv.x, -destUv.y)).a;
|
||||
half spriteBotRight = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(-destUv.x, -destUv.y)).a;
|
||||
result = result + spriteTopLeft + spriteTopRight + spriteBotLeft + spriteBotRight;
|
||||
#endif
|
||||
|
||||
result = step(0.05, saturate(result));
|
||||
|
||||
#if OUTTEX_ON
|
||||
i.uvOutTex.x += ((_Time.x + randomSeed) * _OutlineTexXSpeed) % 1;
|
||||
i.uvOutTex.y += ((_Time.x + randomSeed) * _OutlineTexYSpeed) % 1;
|
||||
#if ATLAS_ON
|
||||
i.uvOutTex = half2((i.uvOutTex.x - _MinXUV) / (_MaxXUV - _MinXUV), (i.uvOutTex.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half4 tempOutColor = ALLIN1_SAMPLE_TEXTURE_2D(_OutlineTex, i.uvOutTex);
|
||||
#if OUTGREYTEXTURE_ON
|
||||
luminance = 0.3 * tempOutColor.r + 0.59 * tempOutColor.g + 0.11 * tempOutColor.b;
|
||||
tempOutColor = half4(luminance, luminance, luminance, 1);
|
||||
#endif
|
||||
tempOutColor *= _OutlineColor;
|
||||
_OutlineColor = tempOutColor;
|
||||
#endif
|
||||
|
||||
result *= (1 - originalAlpha) * _OutlineAlpha;
|
||||
|
||||
half4 outline = _OutlineColor * i.color.a;
|
||||
outline.rgb *= _OutlineGlow;
|
||||
outline.a = result;
|
||||
#if ONLYOUTLINE_ON
|
||||
col = outline;
|
||||
#else
|
||||
col = lerp(col, outline, result);
|
||||
#endif
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if FADE_ON
|
||||
half2 tiledUvFade1= CUSTOM_TRANSFORM_TEX(i.uv, _FadeTex_ScaleAndTiling);
|
||||
half2 tiledUvFade2 = CUSTOM_TRANSFORM_TEX(i.uv, _FadeBurnTex_ScaleAndTiling);
|
||||
#if ATLAS_ON
|
||||
tiledUvFade1 = half2((tiledUvFade1.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUvFade1.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
tiledUvFade2 = half2((tiledUvFade2.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUvFade2.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half fadeTemp = ALLIN1_SAMPLE_TEXTURE_2D(_FadeTex, tiledUvFade1).r;
|
||||
half fade = smoothstep(_FadeAmount, _FadeAmount + _FadeBurnTransition, fadeTemp);
|
||||
half fadeBurn = saturate(smoothstep(_FadeAmount - _FadeBurnWidth, _FadeAmount - _FadeBurnWidth + 0.1, fadeTemp) * _FadeAmount);
|
||||
col.a *= fade;
|
||||
_FadeBurnColor.rgb *= _FadeBurnGlow;
|
||||
col += fadeBurn * ALLIN1_SAMPLE_TEXTURE_2D(_FadeBurnTex, tiledUvFade2) * _FadeBurnColor * originalAlpha * (1 - col.a);
|
||||
#endif
|
||||
|
||||
#if SHADOW_ON
|
||||
half shadowA = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(_ShadowX, _ShadowY)).a;
|
||||
half preMultShadowMask = 1 - (saturate(shadowA - col.a) * (1 - col.a));
|
||||
col.rgb *= 1 - ((shadowA - col.a) * (1 - col.a));
|
||||
col.rgb += (_ShadowColor * shadowA) * (1 - col.a);
|
||||
col.a = max(shadowA * _ShadowAlpha * i.color.a, col.a);
|
||||
#endif
|
||||
|
||||
#if GLOW_ON
|
||||
half4 emission;
|
||||
#if GLOWTEX_ON
|
||||
emission = ALLIN1_SAMPLE_TEXTURE_2D(_GlowTex, i.uv);
|
||||
#else
|
||||
emission = col;
|
||||
#endif
|
||||
col.rgb *= _GlowGlobal;
|
||||
emission.rgb *= emission.a * col.a * _Glow * _GlowColor;
|
||||
col.rgb += emission.rgb;
|
||||
#endif
|
||||
|
||||
#if COLORRAMP_ON && COLORRAMPOUTLINE_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
luminance = saturate(luminance + _ColorRampLuminosity);
|
||||
#if GRADIENTCOLORRAMP_ON
|
||||
col.rgb = lerp(col.rgb, ALLIN1_SAMPLE_TEXTURE_2D(_ColorRampTexGradient, half2(luminance, 0)).rgb, _ColorRampBlend);
|
||||
#else
|
||||
col.rgb = lerp(col.rgb, ALLIN1_SAMPLE_TEXTURE_2D(_ColorRampTex, half2(luminance, 0)).rgb, _ColorRampBlend);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if GREYSCALE_ON && GREYSCALEOUTLINE_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
luminance = saturate(luminance + _GreyscaleLuminosity);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _GreyscaleTintColor, _GreyscaleBlend);
|
||||
#endif
|
||||
|
||||
#if POSTERIZE_ON && POSTERIZEOUTLINE_ON
|
||||
col.rgb = pow(col.rgb, _PosterizeGamma) * _PosterizeNumColors;
|
||||
col.rgb = floor(col.rgb) / _PosterizeNumColors;
|
||||
col.rgb = pow(col.rgb, 1.0 / _PosterizeGamma);
|
||||
#endif
|
||||
|
||||
#if SHINE_ON
|
||||
half2 uvShine = uvRect;
|
||||
half cosAngle = cos(_ShineRotate);
|
||||
half sinAngle = sin(_ShineRotate);
|
||||
half2x2 rot = half2x2(cosAngle, -sinAngle, sinAngle, cosAngle);
|
||||
uvShine -= half2(0.5, 0.5);
|
||||
uvShine = mul(rot, uvShine);
|
||||
uvShine += half2(0.5, 0.5);
|
||||
half shineMask = ALLIN1_SAMPLE_TEXTURE_2D(_ShineMask, i.uv).a;
|
||||
half currentDistanceProjection = (uvShine.x + uvShine.y) / 2;
|
||||
half whitePower = 1 - (abs(currentDistanceProjection - _ShineLocation) / _ShineWidth);
|
||||
col.rgb += col.a * whitePower * _ShineGlow * max(sign(currentDistanceProjection - (_ShineLocation - _ShineWidth)), 0.0)
|
||||
* max(sign((_ShineLocation + _ShineWidth) - currentDistanceProjection), 0.0) * _ShineColor * shineMask;
|
||||
#endif
|
||||
|
||||
#if HOLOGRAM_ON
|
||||
half totalHologram = _HologramStripesAmount + _HologramUnmodAmount;
|
||||
half hologramYCoord = ((uvRect.y + (((_Time.x + randomSeed) % 1) * _HologramStripesSpeed)) % totalHologram) / totalHologram;
|
||||
hologramYCoord = abs(hologramYCoord);
|
||||
half alpha = RemapFloat(saturate(hologramYCoord - (_HologramUnmodAmount/totalHologram)), 0.0, 1.0, _HologramMinAlpha, saturate(_HologramMaxAlpha));
|
||||
half hologramMask = max(sign((_HologramUnmodAmount/totalHologram) - hologramYCoord), 0.0);
|
||||
half4 hologramResult = col;
|
||||
hologramResult.a *= lerp(alpha, 1, hologramMask);
|
||||
hologramResult.rgb *= max(1, _HologramMaxAlpha * max(sign(hologramYCoord - (_HologramUnmodAmount/totalHologram)), 0.0));
|
||||
hologramMask = 1 - step(0.01,hologramMask);
|
||||
hologramResult.rgb += hologramMask * _HologramStripeColor * col.a;
|
||||
col = lerp(col, hologramResult, _HologramBlend);
|
||||
#endif
|
||||
|
||||
#if FLICKER_ON
|
||||
col.a *= saturate(col.a * step(frac(0.05 + (_Time.w + randomSeed) * _FlickerFreq), 1 - _FlickerPercent) + _FlickerAlpha);
|
||||
#endif
|
||||
|
||||
col.a *= _Alpha;
|
||||
|
||||
#if ALPHACUTOFF_ON
|
||||
clip((1 - _AlphaCutoffValue) - (1 - col.a) - 0.01);
|
||||
#endif
|
||||
|
||||
#if ALPHAROUND_ON
|
||||
col.a = step(_AlphaRoundThreshold, col.a);
|
||||
#endif
|
||||
|
||||
#if ALPHAOUTLINE_ON
|
||||
half alphaOutlineRes = pow(1 - col.a, max(_AlphaOutlinePower, 0.0001)) * step(_AlphaOutlineMinAlpha, col.a) * _AlphaOutlineBlend;
|
||||
col.rgb = lerp(col.rgb, _AlphaOutlineColor.rgb * _AlphaOutlineGlow, alphaOutlineRes);
|
||||
col.a = lerp(col.a, 1, alphaOutlineRes > 1);
|
||||
#endif
|
||||
|
||||
col *= _Color;
|
||||
originalAlpha = col.a;
|
||||
|
||||
half4 mask = SAMPLE_TEXTURE2D(_MaskTex, sampler_MaskTex, i.uv);
|
||||
mask.rgb *= _LitAmount;
|
||||
mask = saturate(mask);
|
||||
SurfaceData2D surfaceData;
|
||||
InputData2D inputData;
|
||||
surfaceData.albedo = col.rgb;
|
||||
surfaceData.alpha = col.a;
|
||||
surfaceData.mask = mask;
|
||||
inputData.uv = i.uv;
|
||||
inputData.lightingUV = i.lightingUV;
|
||||
half3 lightResult = CombinedShapeLightShared(surfaceData, inputData).rgb;
|
||||
|
||||
#if GLOWLIGHT_ON
|
||||
mask.rgb += mask.rgb;
|
||||
mask.rgb -= col.rgb;
|
||||
mask.rgb = saturate(mask.rgb);
|
||||
col.rgb = lerp(col.rgb, lightResult, mask.rgb);
|
||||
#else
|
||||
col.rgb = lightResult;
|
||||
#endif
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
#endif //ALLIN1SPRITESHADER_2DRENDERER_FRAGMENTPASS
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20a889619f1033c4497fa398bd65d8a4
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_FragmentPass.hlsl
|
||||
uploadId: 857600
|
||||
+405
@@ -0,0 +1,405 @@
|
||||
#ifndef ALLIN1SPRITESHADER_2DRENDERER_NORMALSRENDERINGFRAGMENTPASS
|
||||
#define ALLIN1SPRITESHADER_2DRENDERER_NORMALSRENDERINGFRAGMENTPASS
|
||||
|
||||
float4 NormalsRenderingFragment(FragmentDataNormalsPass i) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(i);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||||
half randomSeed = UNITY_ACCESS_INSTANCED_PROP(Props, _RandomSeed);
|
||||
|
||||
float texWidth;
|
||||
float texHeight;
|
||||
_MainTex.GetDimensions(texWidth, texHeight);
|
||||
float4 texelSize = float4(1.0 / texWidth, 1 / texHeight, texWidth, texHeight);
|
||||
|
||||
float2 uvRect = i.uv;
|
||||
half2 center = half2(0.5, 0.5);
|
||||
#if ATLAS_ON
|
||||
center = half2((_MaxXUV + _MinXUV) / 2.0, (_MaxYUV + _MinYUV) / 2.0);
|
||||
uvRect = half2((i.uv.x - _MinXUV) / (_MaxXUV - _MinXUV), (i.uv.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half2 centerTiled = half2(center.x * _MainTex_ScaleAndTiling.x, center.y * _MainTex_ScaleAndTiling.y);
|
||||
|
||||
#if CLIPPING_ON
|
||||
half2 tiledUv = half2(i.uv.x / _MainTex_ScaleAndTiling.x, i.uv.y / _MainTex_ScaleAndTiling.y);
|
||||
#if ATLAS_ON
|
||||
tiledUv = half2((tiledUv.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUv.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
clip((1 - _ClipUvUp) - tiledUv.y);
|
||||
clip(tiledUv.y - _ClipUvDown);
|
||||
clip((1 - _ClipUvRight) - tiledUv.x);
|
||||
clip(tiledUv.x - _ClipUvLeft);
|
||||
#endif
|
||||
|
||||
#if RADIALCLIPPING_ON
|
||||
half2 tiledUv2 = half2(i.uv.x / _MainTex_ScaleAndTiling.x, i.uv.y / _MainTex_ScaleAndTiling.y);
|
||||
#if ATLAS_ON
|
||||
tiledUv2 = half2((tiledUv2.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUv2.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half startAngle = _RadialStartAngle - _RadialClip;
|
||||
half endAngle = _RadialStartAngle + _RadialClip2;
|
||||
half offset0 = clamp(0, 360, startAngle + 360);
|
||||
half offset360 = clamp(0, 360, endAngle - 360);
|
||||
half2 atan2Coord = half2(lerp(-1, 1, tiledUv2.x), lerp(-1, 1, tiledUv2.y));
|
||||
half atanAngle = atan2(atan2Coord.y, atan2Coord.x) * 57.3; // angle in degrees
|
||||
if(atanAngle < 0) atanAngle = 360 + atanAngle;
|
||||
if(atanAngle >= startAngle && atanAngle <= endAngle) discard;
|
||||
if(atanAngle <= offset360) discard;
|
||||
if(atanAngle >= offset0) discard;
|
||||
#endif
|
||||
|
||||
#if TEXTURESCROLL_ON && ATLAS_ON
|
||||
i.uv = half2(_MinXUV + ((_MaxXUV - _MinXUV) * (abs(((_Time.y + randomSeed) * _TextureScrollXSpeed) + uvRect.x) % 1)),
|
||||
_MinYUV + ((_MaxYUV - _MinYUV) * (abs(((_Time.y + randomSeed) * _TextureScrollYSpeed) + uvRect.y) % 1)));
|
||||
#endif
|
||||
|
||||
#if OFFSETUV_ON
|
||||
#if ATLAS_ON
|
||||
i.uv = half2(_MinXUV + ((_MaxXUV - _MinXUV) * (abs((_OffsetUvX + uvRect.x) % 1))),
|
||||
_MinYUV + ((_MaxYUV - _MinYUV) * (abs(_OffsetUvY + uvRect.y) % 1)));
|
||||
#else
|
||||
i.uv += half2(_OffsetUvX, _OffsetUvY);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if POLARUV_ON
|
||||
i.uv = half2(atan2(i.uv.y, i.uv.x) / (2.0f * 3.141592653589f), length(i.uv));
|
||||
i.uv *= _MainTex_ScaleAndTiling.xy;
|
||||
#endif
|
||||
|
||||
#if TWISTUV_ON
|
||||
#if ATLAS_ON
|
||||
_TwistUvPosX = ((_MaxXUV - _MinXUV) * _TwistUvPosX) + _MinXUV;
|
||||
_TwistUvPosY = ((_MaxYUV - _MinYUV) * _TwistUvPosY) + _MinYUV;
|
||||
#endif
|
||||
half2 tempUv = i.uv - half2(_TwistUvPosX * _MainTex_ScaleAndTiling.x, _TwistUvPosY * _MainTex_ScaleAndTiling.y);
|
||||
_TwistUvRadius *= (_MainTex_ScaleAndTiling.x + _MainTex_ScaleAndTiling.y) / 2;
|
||||
half percent = (_TwistUvRadius - length(tempUv)) / _TwistUvRadius;
|
||||
half theta = percent * percent * (2.0 * sin(_TwistUvAmount)) * 8.0;
|
||||
half s = sin(theta);
|
||||
half c = cos(theta);
|
||||
half beta = max(sign(_TwistUvRadius - length(tempUv)), 0.0);
|
||||
tempUv = half2(dot(tempUv, half2(c, -s)), dot(tempUv, half2(s, c))) * beta + tempUv * (1 - beta);
|
||||
tempUv += half2(_TwistUvPosX * _MainTex_ScaleAndTiling.x, _TwistUvPosY * _MainTex_ScaleAndTiling.y);
|
||||
i.uv = tempUv;
|
||||
#endif
|
||||
|
||||
#if FISHEYE_ON
|
||||
half bind = length(centerTiled);
|
||||
half2 dF = i.uv - centerTiled;
|
||||
half dFlen = length(dF);
|
||||
half fishInt = (3.14159265359 / bind) * (_FishEyeUvAmount + 0.001);
|
||||
i.uv = centerTiled + (dF / (max(0.0001, dFlen))) * tan(dFlen * fishInt) * bind / tan(bind * fishInt);
|
||||
#endif
|
||||
|
||||
#if PINCH_ON
|
||||
half2 dP = i.uv - centerTiled;
|
||||
half pinchInt = (3.141592 / length(centerTiled)) * (-_PinchUvAmount + 0.001);
|
||||
i.uv = centerTiled + normalize(dP) * atan(length(dP) * -pinchInt * 10.0) * 0.5 / atan(-pinchInt * 5);
|
||||
#endif
|
||||
|
||||
#if ZOOMUV_ON
|
||||
i.uv -= centerTiled;
|
||||
i.uv = i.uv * _ZoomUvAmount;
|
||||
i.uv += centerTiled;
|
||||
#endif
|
||||
|
||||
#if DOODLE_ON
|
||||
half2 uvCopy = uvRect;
|
||||
_HandDrawnSpeed = (floor((_Time.x + randomSeed) * 20 * _HandDrawnSpeed) / _HandDrawnSpeed) * _HandDrawnSpeed;
|
||||
uvCopy.x = sin((uvCopy.x * _HandDrawnAmount + _HandDrawnSpeed) * 4);
|
||||
uvCopy.y = cos((uvCopy.y * _HandDrawnAmount + _HandDrawnSpeed) * 4);
|
||||
i.uv = lerp(i.uv, i.uv + uvCopy, 0.0005 * _HandDrawnAmount);
|
||||
#endif
|
||||
|
||||
#if SHAKEUV_ON
|
||||
half xShake = sin((_Time.x + randomSeed) * _ShakeUvSpeed * 50) * _ShakeUvX;
|
||||
half yShake = cos((_Time.x + randomSeed) * _ShakeUvSpeed * 50) * _ShakeUvY;
|
||||
i.uv += half2(xShake * 0.012, yShake * 0.01);
|
||||
#endif
|
||||
|
||||
#if RECTSIZE_ON
|
||||
i.uv = i.uv.xy * (_RectSize).xx + (((-_RectSize * 0.5) + 0.5)).xx;
|
||||
#endif
|
||||
|
||||
#if DISTORT_ON
|
||||
#if ATLAS_ON
|
||||
i.uvDistTex.x = i.uvDistTex.x * (1 / (_MaxXUV - _MinXUV));
|
||||
i.uvDistTex.y = i.uvDistTex.y * (1 / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
i.uvDistTex.x += ((_Time.x + randomSeed) * _DistortTexXSpeed) % 1;
|
||||
i.uvDistTex.y += ((_Time.x + randomSeed) * _DistortTexYSpeed) % 1;
|
||||
half distortAmnt = (ALLIN1_SAMPLE_TEXTURE_2D(_DistortTex, i.uvDistTex).r - 0.5) * 0.2 * _DistortAmount;
|
||||
i.uv.x += distortAmnt;
|
||||
i.uv.y += distortAmnt;
|
||||
#endif
|
||||
|
||||
#if WARP_ON
|
||||
half2 warpUv = half2(i.uv.x / _MainTex_ScaleAndTiling.x, i.uv.y / _MainTex_ScaleAndTiling.y);
|
||||
#if ATLAS_ON
|
||||
warpUv = half2((warpUv.x - _MinXUV) / (_MaxXUV - _MinXUV), (warpUv.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
const float tau = 6.283185307179586;
|
||||
float xWarp = (_Time.y + randomSeed) * _WarpSpeed + warpUv.x * tau / _WarpScale;
|
||||
float yWarp = (_Time.y + randomSeed) * _WarpSpeed + warpUv.y * tau / _WarpScale;
|
||||
float2 warp = float2(sin(xWarp), sin(yWarp)) * _WarpStrength;
|
||||
i.uv += warp;
|
||||
#endif
|
||||
|
||||
#if WAVEUV_ON
|
||||
float2 uvWave = half2(_WaveX * _MainTex_ScaleAndTiling.x, _WaveY * _MainTex_ScaleAndTiling.y) - i.uv;
|
||||
uvWave %= 1;
|
||||
#if ATLAS_ON
|
||||
uvWave = half2(_WaveX, _WaveY) - uvRect;
|
||||
#endif
|
||||
uvWave.x *= _ScreenParams.x / _ScreenParams.y;
|
||||
float waveTime = _Time.y + randomSeed;
|
||||
float angWave = (sqrt(dot(uvWave, uvWave)) * _WaveAmount) - ((waveTime * _WaveSpeed));
|
||||
i.uv = i.uv + uvWave * sin(angWave) * (_WaveStrength / 1000.0);
|
||||
#endif
|
||||
|
||||
#if ROUNDWAVEUV_ON
|
||||
half xWave = ((0.5 * _MainTex_ScaleAndTiling.x) - uvRect.x);
|
||||
half yWave = ((0.5 * _MainTex_ScaleAndTiling.y) - uvRect.y) * (texelSize.w / texelSize.z);
|
||||
half ripple = -sqrt(xWave*xWave + yWave* yWave);
|
||||
i.uv += sin((ripple + (_Time.y + randomSeed) * (_RoundWaveSpeed/10.0)) / 0.015) * (_RoundWaveStrength/10.0);
|
||||
#endif
|
||||
|
||||
#if WIND_ON
|
||||
half windOffset = sin((_Time.x + randomSeed) * _GrassSpeed * 10);
|
||||
half2 windCenter = half2(0.5, 0.1);
|
||||
#if ATLAS_ON
|
||||
windCenter.x = ((_MaxXUV - _MinXUV) * windCenter.x) + _MinXUV;
|
||||
windCenter.y = ((_MaxYUV - _MinYUV) * windCenter.y) + _MinYUV;
|
||||
#endif
|
||||
#if !MANUALWIND_ON
|
||||
i.uv.x = fmod(abs(lerp(i.uv.x, i.uv.x + (_GrassWind * 0.01 * windOffset), uvRect.y)), 1);
|
||||
#else
|
||||
i.uv.x = fmod(abs(lerp(i.uv.x, i.uv.x + (_GrassWind * 0.01 * _GrassManualAnim), uvRect.y)), 1);
|
||||
windOffset = _GrassManualAnim;
|
||||
#endif
|
||||
half2 delta = i.uv - windCenter;
|
||||
half delta2 = dot(delta.xy, delta.xy);
|
||||
half2 delta_offset = delta2 * windOffset;
|
||||
i.uv = i.uv + half2(delta.y, -delta.x) * delta_offset * _GrassRadialBend;
|
||||
#endif
|
||||
|
||||
#if TEXTURESCROLL_ON && !ATLAS_ON
|
||||
i.uv.x += ((_Time.y + randomSeed) * _TextureScrollXSpeed) % 1;
|
||||
i.uv.y += ((_Time.y + randomSeed) * _TextureScrollYSpeed) % 1;
|
||||
#endif
|
||||
|
||||
#if PIXELATE_ON
|
||||
half aspectRatio = texelSize.x / texelSize.y;
|
||||
half2 pixelSize = float2(_PixelateSize, _PixelateSize * aspectRatio);
|
||||
i.uv = floor(i.uv * pixelSize) / pixelSize;
|
||||
#endif
|
||||
|
||||
half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
|
||||
half originalAlpha = col.a;
|
||||
col *= i.color;
|
||||
#if PREMULTIPLYALPHA_ON
|
||||
col.rgb *= col.a;
|
||||
#endif
|
||||
|
||||
#if GLITCH_ON
|
||||
half2 uvGlitch = uvRect;
|
||||
uvGlitch.y -= 0.5;
|
||||
half lineNoise = pow(rand2(floor(uvGlitch * half2(24., 19.) * _GlitchSize) * 4.0, randomSeed, _GlitchSpeed), 3.0) * _GlitchAmount
|
||||
* pow(rand2(floor(uvGlitch * half2(38., 14.) * _GlitchSize) * 4.0, randomSeed, _GlitchSpeed), 3.0);
|
||||
col = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(lineNoise * 0.02 * rand2(half2(2.0, 1), randomSeed, _GlitchSpeed), 0)) * i.color;
|
||||
#endif
|
||||
|
||||
#if CHROMABERR_ON
|
||||
half4 r = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(_ChromAberrAmount/10, 0)) * i.color;
|
||||
half4 b = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(-_ChromAberrAmount/10, 0)) * i.color;
|
||||
col = half4(r.r * r.a, col.g, b.b * b.a, max(max(r.a, b.a) * _ChromAberrAlpha, col.a));
|
||||
#endif
|
||||
|
||||
#if BLUR_ON
|
||||
#if ATLAS_ON
|
||||
#if !BLURISHD_ON
|
||||
col = BlurHD(i.uv, _MainTex, sampler_MainTex, _BlurIntensity, (_MaxXUV - _MinXUV), (_MaxYUV - _MinYUV)) * i.color;
|
||||
#else
|
||||
col = Blur(i.uv, _MainTex, sampler_MainTex, _BlurIntensity * (_MaxXUV - _MinXUV)) * i.color;
|
||||
#endif
|
||||
#else
|
||||
#if !BLURISHD_ON
|
||||
col = BlurHD(i.uv, _MainTex, sampler_MainTex, _BlurIntensity, 1, 1) * i.color;
|
||||
#else
|
||||
col = Blur(i.uv, _MainTex, sampler_MainTex, _BlurIntensity) * i.color;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
half luminance = 0;
|
||||
#if GHOST_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
half4 ghostResult;
|
||||
ghostResult.a = saturate(luminance - _GhostTransparency) * col.a;
|
||||
ghostResult.rgb = col.rgb * (luminance + _GhostColorBoost);
|
||||
col = lerp(col, ghostResult, _GhostBlend);
|
||||
#endif
|
||||
|
||||
#if OVERLAY_ON
|
||||
half2 overlayUvs = i.uv;
|
||||
overlayUvs.x += ((_Time.y + randomSeed) * _OverlayTextureScrollXSpeed) % 1;
|
||||
overlayUvs.y += ((_Time.y + randomSeed) * _OverlayTextureScrollYSpeed) % 1;
|
||||
half4 overlayCol = ALLIN1_SAMPLE_TEXTURE_2D(_OverlayTex, CUSTOM_TRANSFORM_TEX(overlayUvs, _OverlayTex_ScaleAndTiling));
|
||||
overlayCol.rgb *= _OverlayColor.rgb * _OverlayGlow;
|
||||
#if !OVERLAYMULT_ON
|
||||
overlayCol.rgb *= overlayCol.a * _OverlayColor.rgb * _OverlayColor.a * _OverlayBlend;
|
||||
col.rgb += overlayCol.rgb;
|
||||
#else
|
||||
overlayCol.a *= _OverlayColor.a;
|
||||
col = lerp(col, col * overlayCol, _OverlayBlend);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//OUTLINE-------------------------------------------------------------
|
||||
#if OUTBASE_ON
|
||||
#if OUTBASEPIXELPERF_ON
|
||||
half2 destUv = half2(_OutlinePixelWidth * texelSize.x, _OutlinePixelWidth * texelSize.y);
|
||||
#else
|
||||
half2 destUv = half2(_OutlineWidth * texelSize.x * 200, _OutlineWidth * texelSize.y * 200);
|
||||
#endif
|
||||
|
||||
#if OUTDIST_ON
|
||||
i.uvOutDistTex.x += ((_Time.x + randomSeed) * _OutlineDistortTexXSpeed) % 1;
|
||||
i.uvOutDistTex.y += ((_Time.x + randomSeed) * _OutlineDistortTexYSpeed) % 1;
|
||||
#if ATLAS_ON
|
||||
i.uvOutDistTex = half2((i.uvOutDistTex.x - _MinXUV) / (_MaxXUV - _MinXUV), (i.uvOutDistTex.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half outDistortAmnt = (ALLIN1_SAMPLE_TEXTURE_2D(_OutlineDistortTex, i.uvOutDistTex).r - 0.5) * 0.2 * _OutlineDistortAmount;
|
||||
destUv.x += outDistortAmnt;
|
||||
destUv.y += outDistortAmnt;
|
||||
#endif
|
||||
|
||||
half spriteLeft = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(destUv.x, 0)).a;
|
||||
half spriteRight = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv - half2(destUv.x, 0)).a;
|
||||
half spriteBottom = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(0, destUv.y)).a;
|
||||
half spriteTop = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv - half2(0, destUv.y)).a;
|
||||
half result = spriteLeft + spriteRight + spriteBottom + spriteTop;
|
||||
|
||||
#if OUTBASE8DIR_ON
|
||||
half spriteTopLeft = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(destUv.x, destUv.y)).a;
|
||||
half spriteTopRight = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(-destUv.x, destUv.y)).a;
|
||||
half spriteBotLeft = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(destUv.x, -destUv.y)).a;
|
||||
half spriteBotRight = ALLIN1_SAMPLE_TEXTURE_2D(_MainTex, i.uv + half2(-destUv.x, -destUv.y)).a;
|
||||
result = result + spriteTopLeft + spriteTopRight + spriteBotLeft + spriteBotRight;
|
||||
#endif
|
||||
|
||||
result = step(0.05, saturate(result));
|
||||
|
||||
#if OUTTEX_ON
|
||||
i.uvOutTex.x += ((_Time.x + randomSeed) * _OutlineTexXSpeed) % 1;
|
||||
i.uvOutTex.y += ((_Time.x + randomSeed) * _OutlineTexYSpeed) % 1;
|
||||
#if ATLAS_ON
|
||||
i.uvOutTex = half2((i.uvOutTex.x - _MinXUV) / (_MaxXUV - _MinXUV), (i.uvOutTex.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half4 tempOutColor = ALLIN1_SAMPLE_TEXTURE_2D(_OutlineTex, i.uvOutTex);
|
||||
#if OUTGREYTEXTURE_ON
|
||||
luminance = 0.3 * tempOutColor.r + 0.59 * tempOutColor.g + 0.11 * tempOutColor.b;
|
||||
tempOutColor = half4(luminance, luminance, luminance, 1);
|
||||
#endif
|
||||
tempOutColor *= _OutlineColor;
|
||||
_OutlineColor = tempOutColor;
|
||||
#endif
|
||||
|
||||
result *= (1 - originalAlpha) * _OutlineAlpha;
|
||||
|
||||
half4 outline = _OutlineColor * i.color.a;
|
||||
outline.rgb *= _OutlineGlow;
|
||||
outline.a = result;
|
||||
#if ONLYOUTLINE_ON
|
||||
col = outline;
|
||||
#else
|
||||
col = lerp(col, outline, result);
|
||||
#endif
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if FADE_ON
|
||||
half2 tiledUvFade1 = CUSTOM_TRANSFORM_TEX(i.uv, _FadeTex_ScaleAndTiling);
|
||||
half2 tiledUvFade2 = CUSTOM_TRANSFORM_TEX(i.uv, _FadeBurnTex_ScaleAndTiling);
|
||||
#if ATLAS_ON
|
||||
tiledUvFade1 = half2((tiledUvFade1.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUvFade1.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
tiledUvFade2 = half2((tiledUvFade2.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUvFade2.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half fadeTemp = ALLIN1_SAMPLE_TEXTURE_2D(_FadeTex, tiledUvFade1).r;
|
||||
half fade = smoothstep(_FadeAmount, _FadeAmount + _FadeBurnTransition, fadeTemp);
|
||||
half fadeBurn = saturate(smoothstep(_FadeAmount - _FadeBurnWidth, _FadeAmount - _FadeBurnWidth + 0.1, fadeTemp) * _FadeAmount);
|
||||
col.a *= fade;
|
||||
_FadeBurnColor.rgb *= _FadeBurnGlow;
|
||||
col += fadeBurn * ALLIN1_SAMPLE_TEXTURE_2D(_FadeBurnTex, tiledUvFade2) * _FadeBurnColor * originalAlpha * (1 - col.a);
|
||||
#endif
|
||||
|
||||
#if HOLOGRAM_ON
|
||||
half totalHologram = _HologramStripesAmount + _HologramUnmodAmount;
|
||||
half hologramYCoord = ((uvRect.y + (((_Time.x + randomSeed) % 1) * _HologramStripesSpeed)) % totalHologram) / totalHologram;
|
||||
hologramYCoord = abs(hologramYCoord);
|
||||
half alpha = RemapFloat(saturate(hologramYCoord - (_HologramUnmodAmount/totalHologram)), 0.0, 1.0, _HologramMinAlpha, saturate(_HologramMaxAlpha));
|
||||
half hologramMask = max(sign((_HologramUnmodAmount/totalHologram) - hologramYCoord), 0.0);
|
||||
half4 hologramResult = col;
|
||||
hologramResult.a *= lerp(alpha, 1, hologramMask);
|
||||
hologramResult.rgb *= max(1, _HologramMaxAlpha * max(sign(hologramYCoord - (_HologramUnmodAmount/totalHologram)), 0.0));
|
||||
hologramMask = 1 - step(0.01,hologramMask);
|
||||
hologramResult.rgb += hologramMask * _HologramStripeColor * col.a;
|
||||
col = lerp(col, hologramResult, _HologramBlend);
|
||||
#endif
|
||||
|
||||
#if FLICKER_ON
|
||||
col.a *= saturate(col.a * step(frac(0.05 + (_Time.w + randomSeed) * _FlickerFreq), 1 - _FlickerPercent) + _FlickerAlpha);
|
||||
#endif
|
||||
|
||||
col.a *= _Alpha;
|
||||
|
||||
#if ALPHACUTOFF_ON
|
||||
clip((1 - _AlphaCutoffValue) - (1 - col.a) - 0.01);
|
||||
#endif
|
||||
|
||||
#if ALPHAROUND_ON
|
||||
col.a = step(_AlphaRoundThreshold, col.a);
|
||||
#endif
|
||||
|
||||
#if ALPHAOUTLINE_ON
|
||||
half alphaOutlineRes = pow(1 - col.a, max(_AlphaOutlinePower, 0.0001)) * step(_AlphaOutlineMinAlpha, col.a) * _AlphaOutlineBlend;
|
||||
col.rgb = lerp(col.rgb, _AlphaOutlineColor.rgb * _AlphaOutlineGlow, alphaOutlineRes);
|
||||
col.a = lerp(col.a, 1, alphaOutlineRes > 1);
|
||||
#endif
|
||||
|
||||
col *= _Color;
|
||||
originalAlpha = col.a;
|
||||
|
||||
half4 normalSample = ALLIN1_SAMPLE_TEXTURE_2D(_NormalMap, i.uv);
|
||||
|
||||
#if BLUR_ON
|
||||
#if !BLURISHD_ON
|
||||
normalSample = BlurHD(i.uv, _NormalMap, sampler_NormalMap, _BlurIntensity, 1, 1);
|
||||
#else
|
||||
normalSample = Blur(i.uv, _NormalMap, sampler_NormalMap, _BlurIntensity);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MOTIONBLUR_ON
|
||||
_MotionBlurAngle = _MotionBlurAngle * 3.1415926;
|
||||
#define rot(n) mul(n, half2x2(cos(_MotionBlurAngle), -sin(_MotionBlurAngle), sin(_MotionBlurAngle), cos(_MotionBlurAngle)))
|
||||
_MotionBlurDist = _MotionBlurDist * 0.005;
|
||||
normalSample.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_NormalMap, i.uv + rot(half2(-_MotionBlurDist, -_MotionBlurDist)));
|
||||
normalSample.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_NormalMap, i.uv + rot(half2(-_MotionBlurDist * 2, -_MotionBlurDist * 2)));
|
||||
normalSample.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_NormalMap, i.uv + rot(half2(-_MotionBlurDist * 3, -_MotionBlurDist * 3)));
|
||||
normalSample.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_NormalMap, i.uv + rot(half2(-_MotionBlurDist * 4, -_MotionBlurDist * 4)));
|
||||
normalSample.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_NormalMap, i.uv + rot(half2(_MotionBlurDist, _MotionBlurDist)));
|
||||
normalSample.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_NormalMap, i.uv + rot(half2(_MotionBlurDist * 2, _MotionBlurDist * 2)));
|
||||
normalSample.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_NormalMap, i.uv + rot(half2(_MotionBlurDist * 3, _MotionBlurDist * 3)));
|
||||
normalSample.rgb += ALLIN1_SAMPLE_TEXTURE_2D(_NormalMap, i.uv + rot(half2(_MotionBlurDist * 4, _MotionBlurDist * 4)));
|
||||
normalSample.rgb = normalSample.rgb / 9;
|
||||
#endif
|
||||
|
||||
half3 normalTS = UnpackNormal(normalSample);
|
||||
normalTS.xy *= _NormalStrength;
|
||||
|
||||
return NormalsRenderingShared(col, normalTS, i.tangentWS.xyz, i.bitangentWS.xyz, i.normalWS.xyz);
|
||||
}
|
||||
|
||||
#endif //ALLIN1SPRITESHADER_2DRENDERER_NORMALSRENDERINGFRAGMENTPASS
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4b37519e6c679e49b918bbb9e1ee73a
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_NormalsRenderingFragmentPass.hlsl
|
||||
uploadId: 857600
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
#ifndef ALLIN1SPRITESHADER_2DRENDERER_NORMALSRENDERINGVERTEXPASS
|
||||
#define ALLIN1SPRITESHADER_2DRENDERER_NORMALSRENDERINGVERTEXPASS
|
||||
|
||||
FragmentDataNormalsPass NormalsRenderingVertex(VertexDataNormalsPass v)
|
||||
{
|
||||
#if RECTSIZE_ON
|
||||
v.vertex.xyz += (v.vertex.xyz * (_RectSize - 1.0));
|
||||
#endif
|
||||
|
||||
FragmentDataNormalsPass o;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
#if BILBOARD_ON
|
||||
half3 camRight = mul((half3x3)unity_CameraToWorld, half3(1,0,0));
|
||||
half3 camUp = half3(0,1,0);
|
||||
#if BILBOARDY_ON
|
||||
camUp = mul((half3x3)unity_CameraToWorld, half3(0,1,0));
|
||||
#endif
|
||||
half3 localPos = v.vertex.x * camRight + v.vertex.y * camUp;
|
||||
o.vertex = TransformObjectToHClip(localPos);
|
||||
#else
|
||||
o.vertex = TransformObjectToHClip(v.vertex.xyz);
|
||||
#endif
|
||||
o.uv = /*TRANSFORM_TEX(v.uv, _MainTex);*/v.uv * _MainTex_ScaleAndTiling.xy + _MainTex_ScaleAndTiling.zw;
|
||||
o.color = v.color;
|
||||
|
||||
half2 center = half2(0.5, 0.5);
|
||||
#if ATLAS_ON
|
||||
center = half2((_MaxXUV + _MinXUV) / 2.0, (_MaxYUV + _MinYUV) / 2.0);
|
||||
#endif
|
||||
|
||||
#if POLARUV_ON
|
||||
o.uv = v.uv - center;
|
||||
#endif
|
||||
|
||||
#if ROTATEUV_ON
|
||||
half2 uvC = v.uv;
|
||||
half cosAngle = cos(_RotateUvAmount);
|
||||
half sinAngle = sin(_RotateUvAmount);
|
||||
half2x2 rot = half2x2(cosAngle, -sinAngle, sinAngle, cosAngle);
|
||||
uvC -= center;
|
||||
o.uv = mul(rot, uvC);
|
||||
o.uv += center;
|
||||
#endif
|
||||
|
||||
#if OUTTEX_ON
|
||||
o.uvOutTex = CUSTOM_TRANSFORM_TEX(v.uv, _OutlineTex_ScaleAndTiling);
|
||||
#endif
|
||||
|
||||
#if OUTDIST_ON
|
||||
o.uvOutDistTex = CUSTOM_TRANSFORM_TEX(v.uv, _OutlineDistortTex_ScaleAndTiling);
|
||||
#endif
|
||||
|
||||
#if DISTORT_ON
|
||||
o.uvDistTex = CUSTOM_TRANSFORM_TEX(v.uv, _DistortTex_ScaleAndTiling);
|
||||
#endif
|
||||
|
||||
o.normalWS = -GetViewForwardDir();
|
||||
o.tangentWS = TransformObjectToWorldDir(v.tangent.xyz);
|
||||
o.bitangentWS = cross(o.normalWS, o.tangentWS) * v.tangent.w;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
#endif //ALLIN1SPRITESHADER_2DRENDERER_NORMALSRENDERINGVERTEXPASS
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd224f68ca07bc8428b37ddc8044f25b
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_NormalsRenderingVertexPass.hlsl
|
||||
uploadId: 857600
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
#ifndef ALLIN1SPRITESHADER_2DRENDERER_PROPERTIES
|
||||
#define ALLIN1SPRITESHADER_2DRENDERER_PROPERTIES
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
half4 /*_MainTex_ST, _MainTex_TexelSize,*/ _Color;
|
||||
float4 _MainTex_ScaleAndTiling;
|
||||
|
||||
half _Alpha;
|
||||
half _LitAmount;
|
||||
half _NormalStrength;
|
||||
|
||||
half _MinXUV, _MaxXUV, _MinYUV, _MaxYUV;
|
||||
|
||||
half _RectSize;
|
||||
|
||||
half _OffsetUvX, _OffsetUvY;
|
||||
|
||||
half _ClipUvLeft, _ClipUvRight, _ClipUvUp, _ClipUvDown;
|
||||
|
||||
half _RadialStartAngle, _RadialClip, _RadialClip2;
|
||||
|
||||
half _TwistUvAmount, _TwistUvPosX, _TwistUvPosY, _TwistUvRadius;
|
||||
|
||||
half _RotateUvAmount;
|
||||
|
||||
half _FishEyeUvAmount;
|
||||
|
||||
half _PinchUvAmount;
|
||||
|
||||
half _HandDrawnAmount, _HandDrawnSpeed;
|
||||
|
||||
half _ShakeUvSpeed, _ShakeUvX, _ShakeUvY;
|
||||
|
||||
float _WaveAmount, _WaveSpeed, _WaveStrength, _WaveX, _WaveY;
|
||||
|
||||
half _RoundWaveStrength, _RoundWaveSpeed;
|
||||
|
||||
half _ZoomUvAmount;
|
||||
|
||||
half4 _FadeBurnColor; /*_FadeTex_ST,*/ /*_FadeBurnTex_ST*/
|
||||
float4 _FadeTex_ScaleAndTiling, _FadeBurnTex_ScaleAndTiling;
|
||||
half _FadeAmount, _FadeBurnWidth, _FadeBurnTransition, _FadeBurnGlow;
|
||||
|
||||
half _TextureScrollXSpeed, _TextureScrollYSpeed;
|
||||
|
||||
half4 _GlowColor;
|
||||
half _Glow, _GlowGlobal;
|
||||
|
||||
|
||||
half4 _OutlineColor;
|
||||
half _OutlineAlpha, _OutlineGlow, _OutlineWidth;
|
||||
int _OutlinePixelWidth;
|
||||
|
||||
//half4 _OutlineTex_ST;
|
||||
float4 _OutlineTex_ScaleAndTiling;
|
||||
half _OutlineTexXSpeed, _OutlineTexYSpeed;
|
||||
|
||||
//half4 _OutlineDistortTex_ST;
|
||||
float4 _OutlineDistortTex_ScaleAndTiling;
|
||||
half _OutlineDistortTexXSpeed, _OutlineDistortTexYSpeed, _OutlineDistortAmount;
|
||||
|
||||
//half4 _DistortTex_ST;
|
||||
float4 _DistortTex_ScaleAndTiling;
|
||||
half _DistortTexXSpeed, _DistortTexYSpeed, _DistortAmount;
|
||||
|
||||
half _WarpStrength, _WarpSpeed, _WarpScale;
|
||||
|
||||
half _GrassSpeed, _GrassWind, _GrassManualAnim, _GrassRadialBend;
|
||||
|
||||
half _GradBlend, _GradBoostX, _GradBoostY;
|
||||
half4 _GradTopRightCol, _GradTopLeftCol, _GradBotRightCol, _GradBotLeftCol;
|
||||
|
||||
half4 _ColorSwapRed, _ColorSwapGreen, _ColorSwapBlue;
|
||||
half _ColorSwapRedLuminosity, _ColorSwapGreenLuminosity, _ColorSwapBlueLuminosity, _ColorSwapBlend;
|
||||
|
||||
half _HsvShift, _HsvSaturation, _HsvBright;
|
||||
|
||||
half4 _HitEffectColor;
|
||||
half _HitEffectGlow, _HitEffectBlend;
|
||||
|
||||
half _PixelateSize;
|
||||
|
||||
half _NegativeAmount;
|
||||
|
||||
half _ColorRampLuminosity, _ColorRampBlend;
|
||||
|
||||
half _GreyscaleLuminosity, _GreyscaleBlend;
|
||||
half4 _GreyscaleTintColor;
|
||||
|
||||
half _PosterizeNumColors, _PosterizeGamma;
|
||||
|
||||
half _BlurIntensity;
|
||||
|
||||
half _MotionBlurAngle, _MotionBlurDist;
|
||||
|
||||
half _GhostColorBoost, _GhostTransparency, _GhostBlend;
|
||||
|
||||
half _AlphaOutlineGlow, _AlphaOutlinePower, _AlphaOutlineMinAlpha, _AlphaOutlineBlend;
|
||||
half4 _AlphaOutlineColor;
|
||||
|
||||
half _InnerOutlineThickness, _InnerOutlineAlpha, _InnerOutlineGlow;
|
||||
half4 _InnerOutlineColor;
|
||||
|
||||
half _HologramStripesAmount, _HologramMinAlpha, _HologramUnmodAmount, _HologramStripesSpeed, _HologramMaxAlpha, _HologramBlend;
|
||||
half4 _HologramStripeColor;
|
||||
|
||||
half _ChromAberrAmount, _ChromAberrAlpha;
|
||||
|
||||
half _GlitchAmount, _GlitchSize, _GlitchSpeed;
|
||||
|
||||
half _FlickerFreq, _FlickerPercent, _FlickerAlpha;
|
||||
|
||||
half _ShadowX, _ShadowY, _ShadowAlpha;
|
||||
half4 _ShadowColor;
|
||||
|
||||
half4 _ShineColor;
|
||||
half _ShineLocation, _ShineRotate, _ShineWidth, _ShineGlow;
|
||||
|
||||
half _AlphaCutoffValue;
|
||||
|
||||
half _AlphaRoundThreshold;
|
||||
|
||||
half4 _ColorChangeNewCol, _ColorChangeTarget;
|
||||
half _ColorChangeTolerance, _ColorChangeLuminosity;
|
||||
|
||||
half4 _ColorChangeNewCol2, _ColorChangeTarget2;
|
||||
half _ColorChangeTolerance2;
|
||||
|
||||
half4 _ColorChangeNewCol3, _ColorChangeTarget3;
|
||||
half _ColorChangeTolerance3;
|
||||
|
||||
half _Contrast, _Brightness;
|
||||
|
||||
//half4 _OverlayTex_ST;
|
||||
float4 _OverlayTex_ScaleAndTiling;
|
||||
float4 _OverlayColor;
|
||||
half _OverlayGlow, _OverlayBlend, _OverlayTextureScrollXSpeed, _OverlayTextureScrollYSpeed;
|
||||
|
||||
float _RandomSeed;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
#define CUSTOM_TRANSFORM_TEX(uv, st) uv * st.xy + st.zw
|
||||
#define GET_PIXEL(offsetX, offsetY, uv, tex, texelSize) SAMPLE_TEXTURE2D(tex, sampler##tex, uv + half2(offsetX * texelSize.x, offsetY * texelSize.y)).rgb
|
||||
#define DECLARE_TEX_AND_SAMPLER(texName) \
|
||||
TEXTURE2D(texName);\
|
||||
SAMPLER(sampler##texName);
|
||||
|
||||
|
||||
DECLARE_TEX_AND_SAMPLER(_MainTex)
|
||||
DECLARE_TEX_AND_SAMPLER(_MaskTex)
|
||||
DECLARE_TEX_AND_SAMPLER(_NormalMap)
|
||||
|
||||
#if FADE_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_FadeTex)
|
||||
DECLARE_TEX_AND_SAMPLER(_FadeBurnTex)
|
||||
#endif
|
||||
|
||||
#if GLOW_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_GlowTex)
|
||||
//sampler2D _GlowTex;
|
||||
#endif
|
||||
|
||||
#if OUTTEX_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_OutlineTex)
|
||||
#endif
|
||||
|
||||
#if OUTDIST_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_OutlineDistortTex)
|
||||
//sampler2D _OutlineDistortTex;
|
||||
#endif
|
||||
|
||||
#if DISTORT_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_DistortTex)
|
||||
//sampler2D _DistortTex;
|
||||
#endif
|
||||
|
||||
#if COLORSWAP_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_ColorSwapTex)
|
||||
#endif
|
||||
|
||||
#if COLORRAMP_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_ColorRampTex)
|
||||
DECLARE_TEX_AND_SAMPLER(_ColorRampTexGradient)
|
||||
#endif
|
||||
|
||||
#if SHINE_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_ShineMask)
|
||||
#endif
|
||||
|
||||
#if OVERLAY_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_OverlayTex)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif //ALLIN1SPRITESHADER_2DRENDERER_PROPERTIES
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f5083985f9a1da43a7ce65b4add999a
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Properties.hlsl
|
||||
uploadId: 857600
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
#ifndef ALLIN1SPRITESHADER_2DRENDERER_SHADERFEATURES
|
||||
#define ALLIN1SPRITESHADER_2DRENDERER_SHADERFEATURES
|
||||
|
||||
#pragma shader_feature_local GLOWLIGHT_ON
|
||||
#pragma shader_feature_local GLOW_ON
|
||||
#pragma shader_feature_local FADE_ON
|
||||
#pragma shader_feature_local OUTBASE_ON
|
||||
#pragma shader_feature_local ONLYOUTLINE_ON
|
||||
#pragma shader_feature_local GRADIENT_ON
|
||||
#pragma shader_feature_local GRADIENT2COL_ON
|
||||
#pragma shader_feature_local RADIALGRADIENT_ON
|
||||
#pragma shader_feature_local COLORSWAP_ON
|
||||
#pragma shader_feature_local HSV_ON
|
||||
#pragma shader_feature_local CHANGECOLOR_ON
|
||||
#pragma shader_feature_local CHANGECOLOR2_ON
|
||||
#pragma shader_feature_local CHANGECOLOR3_ON
|
||||
#pragma shader_feature_local COLORRAMP_ON
|
||||
#pragma shader_feature_local GRADIENTCOLORRAMP_ON
|
||||
#pragma shader_feature_local HITEFFECT_ON
|
||||
#pragma shader_feature_local NEGATIVE_ON
|
||||
#pragma shader_feature_local PIXELATE_ON
|
||||
#pragma shader_feature_local GREYSCALE_ON
|
||||
#pragma shader_feature_local POSTERIZE_ON
|
||||
#pragma shader_feature_local BLUR_ON
|
||||
#pragma shader_feature_local MOTIONBLUR_ON
|
||||
#pragma shader_feature_local GHOST_ON
|
||||
#pragma shader_feature_local ALPHAOUTLINE_ON
|
||||
#pragma shader_feature_local INNEROUTLINE_ON
|
||||
#pragma shader_feature_local ONLYINNEROUTLINE_ON
|
||||
#pragma shader_feature_local HOLOGRAM_ON
|
||||
#pragma shader_feature_local CHROMABERR_ON
|
||||
#pragma shader_feature_local GLITCH_ON
|
||||
#pragma shader_feature_local FLICKER_ON
|
||||
#pragma shader_feature_local SHADOW_ON
|
||||
#pragma shader_feature_local SHINE_ON
|
||||
#pragma shader_feature_local CONTRAST_ON
|
||||
#pragma shader_feature_local OVERLAY_ON
|
||||
#pragma shader_feature_local OVERLAYMULT_ON
|
||||
#pragma shader_feature_local ALPHACUTOFF_ON
|
||||
#pragma shader_feature_local ALPHAROUND_ON
|
||||
#pragma shader_feature_local DOODLE_ON
|
||||
#pragma shader_feature_local WIND_ON
|
||||
#pragma shader_feature_local WAVEUV_ON
|
||||
#pragma shader_feature_local ROUNDWAVEUV_ON
|
||||
#pragma shader_feature_local RECTSIZE_ON
|
||||
#pragma shader_feature_local OFFSETUV_ON
|
||||
#pragma shader_feature_local CLIPPING_ON
|
||||
#pragma shader_feature_local RADIALCLIPPING_ON
|
||||
#pragma shader_feature_local TEXTURESCROLL_ON
|
||||
#pragma shader_feature_local ZOOMUV_ON
|
||||
#pragma shader_feature_local DISTORT_ON
|
||||
#pragma shader_feature_local WARP_ON
|
||||
#pragma shader_feature_local TWISTUV_ON
|
||||
#pragma shader_feature_local ROTATEUV_ON
|
||||
#pragma shader_feature_local POLARUV_ON
|
||||
#pragma shader_feature_local FISHEYE_ON
|
||||
#pragma shader_feature_local PINCH_ON
|
||||
#pragma shader_feature_local SHAKEUV_ON
|
||||
|
||||
#pragma shader_feature_local GLOWTEX_ON
|
||||
#pragma shader_feature_local OUTTEX_ON
|
||||
#pragma shader_feature_local OUTDIST_ON
|
||||
#pragma shader_feature_local OUTBASE8DIR_ON
|
||||
#pragma shader_feature_local OUTBASEPIXELPERF_ON
|
||||
#pragma shader_feature_local COLORRAMPOUTLINE_ON
|
||||
#pragma shader_feature_local GREYSCALEOUTLINE_ON
|
||||
#pragma shader_feature_local POSTERIZEOUTLINE_ON
|
||||
#pragma shader_feature_local BLURISHD_ON
|
||||
#pragma shader_feature_local MANUALWIND_ON
|
||||
#pragma shader_feature_local ATLAS_ON
|
||||
#pragma shader_feature_local PREMULTIPLYALPHA_ON
|
||||
|
||||
#pragma shader_feature_local BILBOARD_ON
|
||||
#pragma shader_feature_local BILBOARDY_ON
|
||||
|
||||
#endif //ALLIN1SPRITESHADER_2DRENDERER_SHADERFEATURES
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fa43e9272d7e9da4895de72a2c8e0331
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_ShaderFeatures.hlsl
|
||||
uploadId: 857600
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
#ifndef ALLIN1SPRITESHADER_2DRENDERER_STRUCTS
|
||||
#define ALLIN1SPRITESHADER_2DRENDERER_STRUCTS
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
half4 color : COLOR;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
half4 color : COLOR;
|
||||
float2 lightingUV : TEXCOORD1;
|
||||
#if OUTTEX_ON
|
||||
half2 uvOutTex : TEXCOORD2;
|
||||
#endif
|
||||
#if OUTDIST_ON
|
||||
half2 uvOutDistTex : TEXCOORD3;
|
||||
#endif
|
||||
#if DISTORT_ON
|
||||
half2 uvDistTex : TEXCOORD4;
|
||||
#endif
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
struct VertexDataNormalsPass
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
half4 color : COLOR;
|
||||
half4 tangent : TANGENT;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct FragmentDataNormalsPass
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
half4 color : COLOR;
|
||||
half3 normalWS : TEXCOORD1;
|
||||
half3 tangentWS : TEXCOORD2;
|
||||
half3 bitangentWS : TEXCOORD3;
|
||||
#if OUTTEX_ON
|
||||
half2 uvOutTex : TEXCOORD4;
|
||||
#endif
|
||||
#if OUTDIST_ON
|
||||
half2 uvOutDistTex : TEXCOORD5;
|
||||
#endif
|
||||
#if DISTORT_ON
|
||||
half2 uvDistTex : TEXCOORD6;
|
||||
#endif
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
|
||||
#endif //ALLIN1SPRITESHADER_2DRENDERER_STRUCTS
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 588186a477d7f5a469575ff210c49efa
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_Structs.hlsl
|
||||
uploadId: 857600
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
#ifndef ALLIN1SPRITESHADER_2DRENDERER_VERTEXPASS
|
||||
#define ALLIN1SPRITESHADER_2DRENDERER_VERTEXPASS
|
||||
|
||||
v2f CombinedShapeLightVertex(Attributes v)
|
||||
{
|
||||
#if RECTSIZE_ON
|
||||
v.vertex.xyz += (v.vertex.xyz * (_RectSize - 1.0));
|
||||
#endif
|
||||
|
||||
v2f o;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
#if BILBOARD_ON
|
||||
half3 camRight = mul((half3x3)unity_CameraToWorld, half3(1,0,0));
|
||||
half3 camUp = half3(0,1,0);
|
||||
#if BILBOARDY_ON
|
||||
camUp = mul((half3x3)unity_CameraToWorld, half3(0,1,0));
|
||||
#endif
|
||||
half3 localPos = v.vertex.x * camRight + v.vertex.y * camUp;
|
||||
#if UNITY_VERSION >= 60000000
|
||||
localPos.xy *= unity_SpriteProps.xy;
|
||||
#endif
|
||||
o.vertex = TransformObjectToHClip(localPos);
|
||||
#else
|
||||
half3 localPos = v.vertex.xyz;
|
||||
#if UNITY_VERSION >= 60000000
|
||||
localPos.xy *= unity_SpriteProps.xy;
|
||||
#endif
|
||||
o.vertex = TransformObjectToHClip(localPos);
|
||||
#endif
|
||||
|
||||
o.uv = /*TRANSFORM_TEX(v.uv, _MainTex);*/v.uv * _MainTex_ScaleAndTiling.xy + _MainTex_ScaleAndTiling.zw;
|
||||
o.color = v.color;
|
||||
#if UNITY_VERSION >= 60000000
|
||||
o.color *= unity_SpriteColor;
|
||||
#endif
|
||||
|
||||
half2 center = half2(0.5, 0.5);
|
||||
#if ATLAS_ON
|
||||
center = half2((_MaxXUV + _MinXUV) / 2.0, (_MaxYUV + _MinYUV) / 2.0);
|
||||
#endif
|
||||
|
||||
#if POLARUV_ON
|
||||
o.uv = v.uv - center;
|
||||
#endif
|
||||
|
||||
#if ROTATEUV_ON
|
||||
half2 uvC = v.uv;
|
||||
half cosAngle = cos(_RotateUvAmount);
|
||||
half sinAngle = sin(_RotateUvAmount);
|
||||
half2x2 rot = half2x2(cosAngle, -sinAngle, sinAngle, cosAngle);
|
||||
uvC -= center;
|
||||
o.uv = mul(rot, uvC);
|
||||
o.uv += center;
|
||||
#endif
|
||||
|
||||
#if OUTTEX_ON
|
||||
o.uvOutTex = CUSTOM_TRANSFORM_TEX(v.uv, _OutlineTex_ScaleAndTiling);
|
||||
#endif
|
||||
|
||||
#if OUTDIST_ON
|
||||
o.uvOutDistTex = CUSTOM_TRANSFORM_TEX(v.uv, _OutlineDistortTex_ScaleAndTiling);
|
||||
#endif
|
||||
|
||||
#if DISTORT_ON
|
||||
o.uvDistTex = CUSTOM_TRANSFORM_TEX(v.uv, _DistortTex_ScaleAndTiling);
|
||||
#endif
|
||||
|
||||
half4 clipVertex = o.vertex / o.vertex.w;
|
||||
o.lightingUV = ComputeScreenPos(clipVertex).xy;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
#endif //ALLIN1SPRITESHADER_2DRENDERER_VERTEXPASS
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a3d20933a82e6e5458ed3502ae2dbebb
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/2DRenderer/AllIn1SpriteShader_2DRenderer_VertexPass.hlsl
|
||||
uploadId: 857600
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
#ifndef ALLIN1SPRITESHADERSRP_COMMONFUNCTIONS
|
||||
#define ALLIN1SPRITESHADERSRP_COMMONFUNCTIONS
|
||||
|
||||
//Prevent Unity warnings that are not relevant for this shader-------------------
|
||||
#pragma warning (disable : 3571) // pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
|
||||
#pragma warning (disable : 4008) // floating point division by zero
|
||||
#pragma warning (disable : 3206) // implicit truncation of vector type
|
||||
//BLURS-------------------------------------------------------------------------
|
||||
half4 Blur(half2 uv, Texture2D source, SamplerState texSampler, half Intensity)
|
||||
{
|
||||
const half2 texelSize = 1.0 / _ScreenParams.xy;
|
||||
const half4 color = SAMPLE_TEXTURE2D(source, texSampler, uv);
|
||||
const half2 offset = Intensity * texelSize;
|
||||
|
||||
half4 accumulatedColor = color;
|
||||
half accumulatedWeight = 1.0;
|
||||
for (int x = -1; x <= 1; x++)
|
||||
{
|
||||
for (int y = -1; y <= 1; y++)
|
||||
{
|
||||
const half2 sampleUV = uv + half2(x, y) * offset;
|
||||
const half4 sampleColor = SAMPLE_TEXTURE2D(source, texSampler, sampleUV);
|
||||
|
||||
accumulatedColor += sampleColor;
|
||||
accumulatedWeight += 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
half4 blurredColor = accumulatedColor / accumulatedWeight;
|
||||
return blurredColor;
|
||||
}
|
||||
|
||||
half BlurHD_G(half bhqp, half x)
|
||||
{
|
||||
return exp(-(x * x) / (2.0 * bhqp * bhqp));
|
||||
}
|
||||
half4 BlurHD(half2 uv, Texture2D source, SamplerState texSampler, half BlurAmount, half xScale, half yScale)
|
||||
{
|
||||
int iterations = 16;
|
||||
int halfIterations = iterations / 2;
|
||||
half sigmaX = 0.1 + BlurAmount * 0.5;
|
||||
half sigmaY = sigmaX;
|
||||
half total = 0.0;
|
||||
half4 ret = half4(0, 0, 0, 0);
|
||||
for (int iy = 0; iy < iterations; ++iy)
|
||||
{
|
||||
half fy = BlurHD_G(sigmaY, half(iy) -half(halfIterations));
|
||||
half offsetY = half(iy - halfIterations) * 0.00390625 * xScale;
|
||||
for (int ix = 0; ix < iterations; ++ix)
|
||||
{
|
||||
half fx = BlurHD_G(sigmaX, half(ix) - half(halfIterations));
|
||||
half offsetX = half(ix - halfIterations) * 0.00390625 * yScale;
|
||||
total += fx * fy;
|
||||
ret += SAMPLE_TEXTURE2D(source, texSampler, uv + half2(offsetX, offsetY)) * fx * fy;
|
||||
}
|
||||
}
|
||||
return ret / total;
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
half rand(half2 seed, half offset) {
|
||||
return (frac(sin(dot(seed, half2(12.9898, 78.233))) * 43758.5453) + offset) % 1.0;
|
||||
}
|
||||
|
||||
half rand2(half2 seed, half offset, half speed) {
|
||||
return (frac(sin(dot(seed * floor(50 + (_Time.x % 1.0) * 12. * speed), half2(127.1, 311.7))) * 43758.5453123) + offset) % 1.0;
|
||||
}
|
||||
|
||||
half rand2CustomTime(half2 seed, half offset, half customTime, half speed) {
|
||||
return (frac(sin(dot(seed * floor(50 + (customTime % 1.0) * 12. * speed), half2(127.1, 311.7))) * 43758.5453123) + offset) % 1.0;
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
half RemapFloat(half inValue, half inMin, half inMax, half outMin, half outMax){
|
||||
return outMin + (inValue - inMin) * (outMax - outMin) / (inMax - inMin);
|
||||
}
|
||||
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13806bf35145bcd46a31f91837eda276
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/AllIn1SpriteShaderSRP_CommonFunctions.hlsl
|
||||
uploadId: 857600
|
||||
+573
@@ -0,0 +1,573 @@
|
||||
#ifndef ALLIN1SPRITESHADERSRP_FRAGMENTPASS
|
||||
#define ALLIN1SPRITESHADERSRP_FRAGMENTPASS
|
||||
|
||||
half4 frag(v2f i) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(i);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||||
|
||||
//half randomSeed = UNITY_ACCESS_INSTANCED_PROP(Props, _RandomSeed);
|
||||
float randomSeed = _RandomSeed;
|
||||
|
||||
float texWidth;
|
||||
float texHeight;
|
||||
_MainTex.GetDimensions(texWidth, texHeight);
|
||||
float4 texelSize = float4(1.0 / texWidth, 1 / texHeight, texWidth, texHeight);
|
||||
|
||||
float2 uvRect = i.uv;
|
||||
half2 center = half2(0.5, 0.5);
|
||||
#if ATLAS_ON
|
||||
center = half2((_MaxXUV + _MinXUV) / 2.0, (_MaxYUV + _MinYUV) / 2.0);
|
||||
uvRect = half2((i.uv.x - _MinXUV) / (_MaxXUV - _MinXUV), (i.uv.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half2 centerTiled = half2(center.x * _MainTex_ScaleAndTiling.x, center.y * _MainTex_ScaleAndTiling.y);
|
||||
|
||||
#if CLIPPING_ON
|
||||
half2 tiledUv = half2(i.uv.x / _MainTex_ScaleAndTiling.x, i.uv.y / _MainTex_ScaleAndTiling.y);
|
||||
#if ATLAS_ON
|
||||
tiledUv = half2((tiledUv.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUv.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
clip((1 - _ClipUvUp) - tiledUv.y);
|
||||
clip(tiledUv.y - _ClipUvDown);
|
||||
clip((1 - _ClipUvRight) - tiledUv.x);
|
||||
clip(tiledUv.x - _ClipUvLeft);
|
||||
#endif
|
||||
|
||||
#if RADIALCLIPPING_ON
|
||||
half2 tiledUv2 = half2(i.uv.x / _MainTex_ScaleAndTiling.x, i.uv.y / _MainTex_ScaleAndTiling.y);
|
||||
#if ATLAS_ON
|
||||
tiledUv2 = half2((tiledUv2.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUv2.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half startAngle = _RadialStartAngle - _RadialClip;
|
||||
half endAngle = _RadialStartAngle + _RadialClip2;
|
||||
half offset0 = clamp(0, 360, startAngle + 360);
|
||||
half offset360 = clamp(0, 360, endAngle - 360);
|
||||
half2 atan2Coord = half2(lerp(-1, 1, tiledUv2.x), lerp(-1, 1, tiledUv2.y));
|
||||
half atanAngle = atan2(atan2Coord.y, atan2Coord.x) * 57.3; // angle in degrees
|
||||
if(atanAngle < 0) atanAngle = 360 + atanAngle;
|
||||
if(atanAngle >= startAngle && atanAngle <= endAngle) discard;
|
||||
if(atanAngle <= offset360) discard;
|
||||
if(atanAngle >= offset0) discard;
|
||||
#endif
|
||||
|
||||
#if TEXTURESCROLL_ON && ATLAS_ON
|
||||
i.uv = half2(_MinXUV + ((_MaxXUV - _MinXUV) * (abs(((_Time.y + randomSeed) * _TextureScrollXSpeed) + uvRect.x) % 1)),
|
||||
_MinYUV + ((_MaxYUV - _MinYUV) * (abs(((_Time.y + randomSeed) * _TextureScrollYSpeed) + uvRect.y) % 1)));
|
||||
#endif
|
||||
|
||||
#if OFFSETUV_ON
|
||||
#if ATLAS_ON
|
||||
i.uv = half2(_MinXUV + ((_MaxXUV - _MinXUV) * (abs((_OffsetUvX + uvRect.x) % 1))),
|
||||
_MinYUV + ((_MaxYUV - _MinYUV) * (abs(_OffsetUvY + uvRect.y) % 1)));
|
||||
#else
|
||||
i.uv += half2(_OffsetUvX, _OffsetUvY);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if POLARUV_ON
|
||||
i.uv = half2(atan2(i.uv.y, i.uv.x) / (2.0f * 3.141592653589f), length(i.uv));
|
||||
i.uv *= _MainTex_ScaleAndTiling.xy;
|
||||
#endif
|
||||
|
||||
#if TWISTUV_ON
|
||||
#if ATLAS_ON
|
||||
_TwistUvPosX = ((_MaxXUV - _MinXUV) * _TwistUvPosX) + _MinXUV;
|
||||
_TwistUvPosY = ((_MaxYUV - _MinYUV) * _TwistUvPosY) + _MinYUV;
|
||||
#endif
|
||||
half2 tempUv = i.uv - half2(_TwistUvPosX * _MainTex_ScaleAndTiling.x, _TwistUvPosY * _MainTex_ScaleAndTiling.y);
|
||||
_TwistUvRadius *= (_MainTex_ScaleAndTiling.x + _MainTex_ScaleAndTiling.y) / 2;
|
||||
half percent = (_TwistUvRadius - length(tempUv)) / _TwistUvRadius;
|
||||
half theta = percent * percent * (2.0 * sin(_TwistUvAmount)) * 8.0;
|
||||
half s = sin(theta);
|
||||
half c = cos(theta);
|
||||
half beta = max(sign(_TwistUvRadius - length(tempUv)), 0.0);
|
||||
tempUv = half2(dot(tempUv, half2(c, -s)), dot(tempUv, half2(s, c))) * beta + tempUv * (1 - beta);
|
||||
tempUv += half2(_TwistUvPosX * _MainTex_ScaleAndTiling.x, _TwistUvPosY * _MainTex_ScaleAndTiling.y);
|
||||
i.uv = tempUv;
|
||||
#endif
|
||||
|
||||
#if FISHEYE_ON
|
||||
half bind = length(centerTiled);
|
||||
half2 dF = i.uv - centerTiled;
|
||||
half dFlen = length(dF);
|
||||
half fishInt = (3.14159265359 / bind) * (_FishEyeUvAmount + 0.001);
|
||||
i.uv = centerTiled + (dF / (max(0.0001, dFlen))) * tan(dFlen * fishInt) * bind / tan(bind * fishInt);
|
||||
#endif
|
||||
|
||||
#if PINCH_ON
|
||||
half2 dP = i.uv - centerTiled;
|
||||
half pinchInt = (3.141592 / length(centerTiled)) * (-_PinchUvAmount + 0.001);
|
||||
i.uv = centerTiled + normalize(dP) * atan(length(dP) * -pinchInt * 10.0) * 0.5 / atan(-pinchInt * 5);
|
||||
#endif
|
||||
|
||||
#if ZOOMUV_ON
|
||||
i.uv -= centerTiled;
|
||||
i.uv = i.uv * _ZoomUvAmount;
|
||||
i.uv += centerTiled;
|
||||
#endif
|
||||
|
||||
#if DOODLE_ON
|
||||
half2 uvCopy = uvRect;
|
||||
_HandDrawnSpeed = (floor((_Time.x + randomSeed) * 20 * _HandDrawnSpeed) / _HandDrawnSpeed) * _HandDrawnSpeed;
|
||||
uvCopy.x = sin((uvCopy.x * _HandDrawnAmount + _HandDrawnSpeed) * 4);
|
||||
uvCopy.y = cos((uvCopy.y * _HandDrawnAmount + _HandDrawnSpeed) * 4);
|
||||
i.uv = lerp(i.uv, i.uv + uvCopy, 0.0005 * _HandDrawnAmount);
|
||||
#endif
|
||||
|
||||
#if SHAKEUV_ON
|
||||
half xShake = sin((_Time.x + randomSeed) * _ShakeUvSpeed * 50) * _ShakeUvX;
|
||||
half yShake = cos((_Time.x + randomSeed) * _ShakeUvSpeed * 50) * _ShakeUvY;
|
||||
i.uv += half2(xShake * 0.012, yShake * 0.01);
|
||||
#endif
|
||||
|
||||
#if RECTSIZE_ON
|
||||
i.uv = i.uv.xy * (_RectSize).xx + (((-_RectSize * 0.5) + 0.5)).xx;
|
||||
#endif
|
||||
|
||||
#if DISTORT_ON
|
||||
#if ATLAS_ON
|
||||
i.uvDistTex.x = i.uvDistTex.x * (1 / (_MaxXUV - _MinXUV));
|
||||
i.uvDistTex.y = i.uvDistTex.y * (1 / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
i.uvDistTex.x += ((_Time.x + randomSeed) * _DistortTexXSpeed) % 1;
|
||||
i.uvDistTex.y += ((_Time.x + randomSeed) * _DistortTexYSpeed) % 1;
|
||||
half distortAmnt = (SAMPLE_TEXTURE2D(_DistortTex, sampler_DistortTex, i.uvDistTex).r - 0.5) * 0.2 * _DistortAmount;
|
||||
i.uv.x += distortAmnt;
|
||||
i.uv.y += distortAmnt;
|
||||
#endif
|
||||
|
||||
#if WARP_ON
|
||||
half2 warpUv = half2(i.uv.x / _MainTex_ScaleAndTiling.x, i.uv.y / _MainTex_ScaleAndTiling.y);
|
||||
#if ATLAS_ON
|
||||
warpUv = half2((warpUv.x - _MinXUV) / (_MaxXUV - _MinXUV), (warpUv.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
const float tau = 6.283185307179586;
|
||||
float xWarp = (_Time.y + randomSeed) * _WarpSpeed + warpUv.x * tau / _WarpScale;
|
||||
float yWarp = (_Time.y + randomSeed) * _WarpSpeed + warpUv.y * tau / _WarpScale;
|
||||
float2 warp = float2(sin(xWarp), sin(yWarp)) * _WarpStrength;
|
||||
i.uv += warp;
|
||||
#endif
|
||||
|
||||
#if WAVEUV_ON
|
||||
float2 uvWave = half2(_WaveX * _MainTex_ScaleAndTiling.x, _WaveY * _MainTex_ScaleAndTiling.y) - i.uv;
|
||||
uvWave %= 1;
|
||||
#if ATLAS_ON
|
||||
uvWave = half2(_WaveX, _WaveY) - uvRect;
|
||||
#endif
|
||||
uvWave.x *= _ScreenParams.x / _ScreenParams.y;
|
||||
float waveTime = _Time.y + randomSeed;
|
||||
float angWave = (sqrt(dot(uvWave, uvWave)) * _WaveAmount) - ((waveTime * _WaveSpeed));
|
||||
i.uv = i.uv + uvWave * sin(angWave) * (_WaveStrength / 1000.0);
|
||||
#endif
|
||||
|
||||
#if ROUNDWAVEUV_ON
|
||||
half xWave = ((0.5 * _MainTex_ScaleAndTiling.x) - uvRect.x);
|
||||
half yWave = ((0.5 * _MainTex_ScaleAndTiling.y) - uvRect.y) * (texelSize.w / texelSize.z);
|
||||
half ripple = -sqrt(xWave*xWave + yWave* yWave);
|
||||
i.uv += (sin((ripple + (_Time.y + randomSeed) * (_RoundWaveSpeed/10.0)) / 0.015) * (_RoundWaveStrength/10.0)) % 1;
|
||||
#endif
|
||||
|
||||
#if WIND_ON
|
||||
half windOffset = sin((_Time.x + randomSeed) * _GrassSpeed * 10);
|
||||
half2 windCenter = half2(0.5, 0.1);
|
||||
#if ATLAS_ON
|
||||
windCenter.x = ((_MaxXUV - _MinXUV) * windCenter.x) + _MinXUV;
|
||||
windCenter.y = ((_MaxYUV - _MinYUV) * windCenter.y) + _MinYUV;
|
||||
#endif
|
||||
#if !MANUALWIND_ON
|
||||
i.uv.x = fmod(abs(lerp(i.uv.x, i.uv.x + (_GrassWind * 0.01 * windOffset), uvRect.y)), 1);
|
||||
#else
|
||||
i.uv.x = fmod(abs(lerp(i.uv.x, i.uv.x + (_GrassWind * 0.01 * _GrassManualAnim), uvRect.y)), 1);
|
||||
windOffset = _GrassManualAnim;
|
||||
#endif
|
||||
half2 delta = i.uv - windCenter;
|
||||
half delta2 = dot(delta.xy, delta.xy);
|
||||
half2 delta_offset = delta2 * windOffset;
|
||||
i.uv = i.uv + half2(delta.y, -delta.x) * delta_offset * _GrassRadialBend;
|
||||
#endif
|
||||
|
||||
#if TEXTURESCROLL_ON && !ATLAS_ON
|
||||
i.uv.x += ((_Time.y + randomSeed) * _TextureScrollXSpeed) % 1;
|
||||
i.uv.y += ((_Time.y + randomSeed) * _TextureScrollYSpeed) % 1;
|
||||
#endif
|
||||
|
||||
#if PIXELATE_ON
|
||||
half aspectRatio = texelSize.x / texelSize.y;
|
||||
half2 pixelSize = float2(_PixelateSize, _PixelateSize * aspectRatio);
|
||||
i.uv = floor(i.uv * pixelSize) / pixelSize;
|
||||
#endif
|
||||
|
||||
half4 col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
|
||||
half originalAlpha = col.a;
|
||||
col *= i.color;
|
||||
#if PREMULTIPLYALPHA_ON
|
||||
col.rgb *= col.a;
|
||||
#endif
|
||||
|
||||
#if GLITCH_ON
|
||||
half2 uvGlitch = uvRect;
|
||||
uvGlitch.y -= 0.5;
|
||||
half lineNoise = pow(rand2(floor(uvGlitch * half2(24., 19.) * _GlitchSize) * 4.0, randomSeed, _GlitchSpeed), 3.0) * _GlitchAmount
|
||||
* pow(rand2(floor(uvGlitch * half2(38., 14.) * _GlitchSize) * 4.0, randomSeed, _GlitchSpeed), 3.0);
|
||||
col = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(lineNoise * 0.02 * rand2(half2(2.0, 1), randomSeed, _GlitchSpeed), 0)) * i.color;
|
||||
#endif
|
||||
|
||||
#if CHROMABERR_ON
|
||||
half4 r = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(_ChromAberrAmount/10, 0)) * i.color;
|
||||
half4 b = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(-_ChromAberrAmount/10, 0)) * i.color;
|
||||
col = half4(r.r * r.a, col.g, b.b * b.a, max(max(r.a, b.a) * _ChromAberrAlpha, col.a));
|
||||
#endif
|
||||
|
||||
#if BLUR_ON
|
||||
#if ATLAS_ON
|
||||
#if !BLURISHD_ON
|
||||
col = BlurHD(i.uv, _MainTex, sampler_MainTex, _BlurIntensity, (_MaxXUV - _MinXUV), (_MaxYUV - _MinYUV)) * i.color;
|
||||
#else
|
||||
col = Blur(i.uv, _MainTex, sampler_MainTex, _BlurIntensity * (_MaxXUV - _MinXUV)) * i.color;
|
||||
#endif
|
||||
#else
|
||||
#if !BLURISHD_ON
|
||||
col = BlurHD(i.uv, _MainTex, sampler_MainTex, _BlurIntensity, 1, 1) * i.color;
|
||||
#else
|
||||
col = Blur(i.uv, _MainTex, sampler_MainTex, _BlurIntensity) * i.color;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MOTIONBLUR_ON
|
||||
_MotionBlurAngle = _MotionBlurAngle * 3.1415926;
|
||||
#define rot(n) mul(n, half2x2(cos(_MotionBlurAngle), -sin(_MotionBlurAngle), sin(_MotionBlurAngle), cos(_MotionBlurAngle)))
|
||||
_MotionBlurDist = _MotionBlurDist * 0.005;
|
||||
#if ATLAS_ON
|
||||
_MotionBlurDist *= (_MaxXUV - _MinXUV);
|
||||
#endif
|
||||
col.rgb += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + rot(half2(-_MotionBlurDist, -_MotionBlurDist)));
|
||||
col.rgb += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + rot(half2(-_MotionBlurDist * 2, -_MotionBlurDist * 2)));
|
||||
col.rgb += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + rot(half2(-_MotionBlurDist * 3, -_MotionBlurDist * 3)));
|
||||
col.rgb += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + rot(half2(-_MotionBlurDist * 4, -_MotionBlurDist * 4)));
|
||||
col.rgb += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + rot(half2(_MotionBlurDist, _MotionBlurDist)));
|
||||
col.rgb += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + rot(half2(_MotionBlurDist * 2, _MotionBlurDist * 2)));
|
||||
col.rgb += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + rot(half2(_MotionBlurDist * 3, _MotionBlurDist * 3)));
|
||||
col.rgb += SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + rot(half2(_MotionBlurDist * 4, _MotionBlurDist * 4)));
|
||||
col.rgb = col.rgb / 9;
|
||||
#endif
|
||||
|
||||
#if NEGATIVE_ON
|
||||
col.rgb = lerp(col.rgb, 1 - col.rgb, _NegativeAmount);
|
||||
#endif
|
||||
|
||||
half luminance = 0;
|
||||
#if GREYSCALE_ON && !GREYSCALEOUTLINE_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
luminance = saturate(luminance + _GreyscaleLuminosity);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _GreyscaleTintColor, _GreyscaleBlend);
|
||||
#endif
|
||||
|
||||
#if GHOST_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
half4 ghostResult;
|
||||
ghostResult.a = saturate(luminance - _GhostTransparency) * col.a;
|
||||
ghostResult.rgb = col.rgb * (luminance + _GhostColorBoost);
|
||||
col = lerp(col, ghostResult, _GhostBlend);
|
||||
#endif
|
||||
|
||||
#if INNEROUTLINE_ON
|
||||
half3 innerT = abs(GET_PIXEL(0, _InnerOutlineThickness, i.uv, _MainTex, texelSize) - GET_PIXEL(0, -_InnerOutlineThickness, i.uv, _MainTex, texelSize));
|
||||
innerT += abs(GET_PIXEL(_InnerOutlineThickness, 0, i.uv, _MainTex, texelSize) - GET_PIXEL(-_InnerOutlineThickness, 0, i.uv, _MainTex, texelSize));
|
||||
#if !ONLYINNEROUTLINE_ON
|
||||
innerT = (innerT / 2.0) * col.a * _InnerOutlineAlpha;
|
||||
col.rgb += length(innerT) * _InnerOutlineColor.rgb * _InnerOutlineGlow;
|
||||
#else
|
||||
innerT *= col.a * _InnerOutlineAlpha;
|
||||
col.rgb = length(innerT) * _InnerOutlineColor.rgb * _InnerOutlineGlow;
|
||||
col.a = step(0.3, col.r+col.g+col.b);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HITEFFECT_ON
|
||||
col.rgb = lerp(col.rgb, _HitEffectColor.rgb * _HitEffectGlow, _HitEffectBlend);
|
||||
#endif
|
||||
|
||||
#if GRADIENT_ON
|
||||
half2 tiledUvGrad = half2(uvRect.x / _MainTex_ScaleAndTiling.x, uvRect.y / _MainTex_ScaleAndTiling.y);
|
||||
#if GRADIENT2COL_ON
|
||||
_GradTopRightCol = _GradTopLeftCol;
|
||||
_GradBotRightCol = _GradBotLeftCol;
|
||||
#endif
|
||||
#if RADIALGRADIENT_ON
|
||||
half radialDist = 1 - length(tiledUvGrad - half2(0.5, 0.5));
|
||||
radialDist *= (texelSize.w / texelSize.z);
|
||||
radialDist = saturate(_GradBoostX * radialDist);
|
||||
half4 gradientResult = lerp(_GradTopLeftCol, _GradBotLeftCol, radialDist);
|
||||
#else
|
||||
half gradXLerpFactor = saturate(pow(tiledUvGrad.x, _GradBoostX));
|
||||
half4 gradientResult = lerp(lerp(_GradBotLeftCol, _GradBotRightCol, gradXLerpFactor),
|
||||
lerp(_GradTopLeftCol, _GradTopRightCol, gradXLerpFactor), saturate(pow(tiledUvGrad.y, _GradBoostY)));
|
||||
#endif
|
||||
gradientResult = lerp(col, gradientResult, _GradBlend);
|
||||
col.rgb = gradientResult.rgb * col.a;
|
||||
col.a *= gradientResult.a;
|
||||
#endif
|
||||
|
||||
#if CONTRAST_ON
|
||||
col.rgb = (col.rgb - float3(0.5, 0.5, 0.5)) * _Contrast + float3(0.5, 0.5, 0.5);
|
||||
col.rgb += _Brightness;
|
||||
#endif
|
||||
|
||||
#if COLORSWAP_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
half4 swapMask = SAMPLE_TEXTURE2D(_ColorSwapTex, sampler_ColorSwapTex, i.uv);
|
||||
swapMask.rgb *= swapMask.a;
|
||||
half3 redSwap = _ColorSwapRed * swapMask.r * saturate(luminance + _ColorSwapRedLuminosity);
|
||||
half3 greenSwap = _ColorSwapGreen * swapMask.g * saturate(luminance + _ColorSwapGreenLuminosity);
|
||||
half3 blueSwap = _ColorSwapBlue * swapMask.b * saturate(luminance + _ColorSwapBlueLuminosity);
|
||||
swapMask.rgb = col.rgb * saturate(1 - swapMask.r - swapMask.g - swapMask.b);
|
||||
col.rgb = lerp(col.rgb, swapMask.rgb + redSwap + greenSwap + blueSwap, _ColorSwapBlend);
|
||||
#endif
|
||||
|
||||
#if COLORRAMP_ON && !COLORRAMPOUTLINE_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
luminance = saturate(luminance + _ColorRampLuminosity);
|
||||
#if GRADIENTCOLORRAMP_ON
|
||||
col.rgb = lerp(col.rgb, SAMPLE_TEXTURE2D(_ColorRampTexGradient, sampler_ColorRampTexGradient, half2(luminance, 0)).rgb, _ColorRampBlend);
|
||||
#else
|
||||
col.rgb = lerp(col.rgb, SAMPLE_TEXTURE2D(_ColorRampTex, sampler_ColorRampTex, half2(luminance, 0)).rgb, _ColorRampBlend);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CHANGECOLOR_ON
|
||||
float3 currChangeColor = saturate(col.rgb);
|
||||
luminance = 0.3 * currChangeColor.r + 0.59 * currChangeColor.g + 0.11 * currChangeColor.b;
|
||||
luminance = saturate(luminance + _ColorChangeLuminosity);
|
||||
half3 dif = abs(currChangeColor - _ColorChangeTarget.rgb);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _ColorChangeNewCol.rgb,
|
||||
max(sign(1 - saturate(dif.x + dif.y + dif.z) - _ColorChangeTolerance), 0.0));
|
||||
#if CHANGECOLOR2_ON
|
||||
dif = abs(currChangeColor - _ColorChangeTarget2.rgb);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _ColorChangeNewCol2.rgb,
|
||||
max(sign(1 - saturate(dif.x + dif.y + dif.z) - _ColorChangeTolerance2), 0.0));
|
||||
#endif
|
||||
#if CHANGECOLOR3_ON
|
||||
dif = abs(currChangeColor - _ColorChangeTarget3.rgb);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _ColorChangeNewCol3.rgb,
|
||||
max(sign(1 - saturate(dif.x + dif.y + dif.z) - _ColorChangeTolerance3), 0.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if POSTERIZE_ON && !POSTERIZEOUTLINE_ON
|
||||
col.rgb = pow(col.rgb, _PosterizeGamma) * _PosterizeNumColors;
|
||||
col.rgb = floor(col.rgb) / _PosterizeNumColors;
|
||||
col.rgb = pow(col.rgb, 1.0 / _PosterizeGamma);
|
||||
#endif
|
||||
|
||||
#if HSV_ON
|
||||
half3 resultHsv = half3(col.rgb);
|
||||
half cosHsv = _HsvBright * _HsvSaturation * cos(_HsvShift * 3.14159265 / 180);
|
||||
half sinHsv = _HsvBright * _HsvSaturation * sin(_HsvShift * 3.14159265 / 180);
|
||||
resultHsv.x = (.299 * _HsvBright + .701 * cosHsv + .168 * sinHsv) * col.x
|
||||
+ (.587 * _HsvBright - .587 * cosHsv + .330 * sinHsv) * col.y
|
||||
+ (.114 * _HsvBright - .114 * cosHsv - .497 * sinHsv) * col.z;
|
||||
resultHsv.y = (.299 * _HsvBright - .299 * cosHsv - .328 * sinHsv) *col.x
|
||||
+ (.587 * _HsvBright + .413 * cosHsv + .035 * sinHsv) * col.y
|
||||
+ (.114 * _HsvBright - .114 * cosHsv + .292 * sinHsv) * col.z;
|
||||
resultHsv.z = (.299 * _HsvBright - .3 * cosHsv + 1.25 * sinHsv) * col.x
|
||||
+ (.587 * _HsvBright - .588 * cosHsv - 1.05 * sinHsv) * col.y
|
||||
+ (.114 * _HsvBright + .886 * cosHsv - .203 * sinHsv) * col.z;
|
||||
col.rgb = resultHsv;
|
||||
#endif
|
||||
|
||||
#if OVERLAY_ON
|
||||
half2 overlayUvs = uvRect;
|
||||
overlayUvs.x += ((_Time.y + randomSeed) * _OverlayTextureScrollXSpeed) % 1;
|
||||
overlayUvs.y += ((_Time.y + randomSeed) * _OverlayTextureScrollYSpeed) % 1;
|
||||
half4 overlayCol = SAMPLE_TEXTURE2D(_OverlayTex, sampler_OverlayTex, CUSTOM_TRANSFORM_TEX(overlayUvs, _OverlayTex_ScaleAndTiling));
|
||||
overlayCol.rgb *= _OverlayColor.rgb * _OverlayGlow;
|
||||
#if !OVERLAYMULT_ON
|
||||
overlayCol.rgb *= overlayCol.a * _OverlayColor.rgb * _OverlayColor.a * _OverlayBlend;
|
||||
col.rgb += overlayCol.rgb;
|
||||
#else
|
||||
overlayCol.a *= _OverlayColor.a;
|
||||
col = lerp(col, col * overlayCol, _OverlayBlend);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//OUTLINE-------------------------------------------------------------
|
||||
#if OUTBASE_ON
|
||||
#if OUTBASEPIXELPERF_ON
|
||||
//half2 destUv = _OutlinePixelWidth / unity_SpriteProps.w;
|
||||
half2 destUv = half2(_OutlinePixelWidth * texelSize.x, _OutlinePixelWidth * texelSize.y);
|
||||
#else
|
||||
//half2 destUv = _OutlinePixelWidth / unity_SpriteProps.w;
|
||||
half2 destUv = half2(_OutlineWidth * texelSize.x * 200, _OutlineWidth * texelSize.y * 200);
|
||||
#endif
|
||||
|
||||
#if OUTDIST_ON
|
||||
half2 uvOutDist = uvRect;
|
||||
uvOutDist.x += ((_Time.x + randomSeed) * _OutlineDistortTexXSpeed) % 1;
|
||||
uvOutDist.y += ((_Time.x + randomSeed) * _OutlineDistortTexYSpeed) % 1;
|
||||
half outDistortAmnt = (SAMPLE_TEXTURE2D(_OutlineDistortTex, sampler_OutlineDistortTex, CUSTOM_TRANSFORM_TEX(uvOutDist, _OutlineDistortTex_ScaleAndTiling)).r - 0.5) * 0.2 * _OutlineDistortAmount;
|
||||
destUv.x += outDistortAmnt;
|
||||
destUv.y += outDistortAmnt;
|
||||
#endif
|
||||
|
||||
half spriteLeft = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(destUv.x, 0)).a;
|
||||
half spriteRight = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv - half2(destUv.x, 0)).a;
|
||||
half spriteBottom = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(0, destUv.y)).a;
|
||||
half spriteTop = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv - half2(0, destUv.y)).a;
|
||||
|
||||
half result = spriteLeft + spriteRight + spriteBottom + spriteTop;
|
||||
|
||||
#if OUTBASE8DIR_ON
|
||||
half spriteTopLeft = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(destUv.x, destUv.y)).a;
|
||||
half spriteTopRight = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(-destUv.x, destUv.y)).a;
|
||||
half spriteBotLeft = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(destUv.x, -destUv.y)).a;
|
||||
half spriteBotRight = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(-destUv.x, -destUv.y)).a;
|
||||
|
||||
result = result + spriteTopLeft + spriteTopRight + spriteBotLeft + spriteBotRight;
|
||||
#endif
|
||||
|
||||
result = step(0.05, saturate(result));
|
||||
|
||||
#if OUTTEX_ON
|
||||
i.uvOutTex.x += ((_Time.x + randomSeed) * _OutlineTexXSpeed) % 1;
|
||||
i.uvOutTex.y += ((_Time.x + randomSeed) * _OutlineTexYSpeed) % 1;
|
||||
#if ATLAS_ON
|
||||
i.uvOutTex = half2((i.uvOutTex.x - _MinXUV) / (_MaxXUV - _MinXUV), (i.uvOutTex.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half4 tempOutColor = SAMPLE_TEXTURE2D(_OutlineTex, sampler_OutlineTex, i.uvOutTex);
|
||||
tempOutColor *= _OutlineColor;
|
||||
_OutlineColor = tempOutColor;
|
||||
#endif
|
||||
|
||||
result *= (1 - originalAlpha) * _OutlineAlpha;
|
||||
|
||||
half4 outline = _OutlineColor * i.color.a;
|
||||
outline.rgb *= _OutlineGlow;
|
||||
outline.a = result;
|
||||
#if ONLYOUTLINE_ON
|
||||
col = outline;
|
||||
#else
|
||||
col = lerp(col, outline, result);
|
||||
#endif
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if FADE_ON
|
||||
half2 tiledUvFade1= CUSTOM_TRANSFORM_TEX(i.uv, _FadeTex_ScaleAndTiling);
|
||||
half2 tiledUvFade2 = CUSTOM_TRANSFORM_TEX(i.uv, _FadeBurnTex_ScaleAndTiling);
|
||||
#if ATLAS_ON
|
||||
tiledUvFade1 = half2((tiledUvFade1.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUvFade1.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
tiledUvFade2 = half2((tiledUvFade2.x - _MinXUV) / (_MaxXUV - _MinXUV), (tiledUvFade2.y - _MinYUV) / (_MaxYUV - _MinYUV));
|
||||
#endif
|
||||
half fadeTemp = SAMPLE_TEXTURE2D(_FadeTex, sampler_FadeTex, tiledUvFade1).r;
|
||||
half fade = smoothstep(_FadeAmount, _FadeAmount + _FadeBurnTransition, fadeTemp);
|
||||
half fadeBurn = saturate(smoothstep(_FadeAmount - _FadeBurnWidth, _FadeAmount - _FadeBurnWidth + 0.1, fadeTemp) * _FadeAmount);
|
||||
col.a *= fade;
|
||||
_FadeBurnColor.rgb *= _FadeBurnGlow;
|
||||
col += fadeBurn * SAMPLE_TEXTURE2D(_FadeBurnTex, sampler_FadeBurnTex, tiledUvFade2) * _FadeBurnColor * originalAlpha * (1 - col.a);
|
||||
#endif
|
||||
|
||||
#if SHADOW_ON
|
||||
half shadowA = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv + half2(_ShadowX, _ShadowY)).a;
|
||||
half preMultShadowMask = 1 - (saturate(shadowA - col.a) * (1 - col.a));
|
||||
col.rgb *= 1 - ((shadowA - col.a) * (1 - col.a));
|
||||
col.rgb += (_ShadowColor * shadowA) * (1 - col.a);
|
||||
col.a = max(shadowA * _ShadowAlpha * i.color.a, col.a);
|
||||
#endif
|
||||
|
||||
#if GLOW_ON
|
||||
half4 emission;
|
||||
#if GLOWTEX_ON
|
||||
emission = SAMPLE_TEXTURE2D(_GlowTex, sampler_GlowTex, i.uv);
|
||||
#else
|
||||
emission = col;
|
||||
#endif
|
||||
col.rgb *= _GlowGlobal;
|
||||
emission.rgb *= emission.a * col.a * _Glow * _GlowColor;
|
||||
col.rgb += emission.rgb;
|
||||
#endif
|
||||
|
||||
#if COLORRAMP_ON && COLORRAMPOUTLINE_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
luminance = saturate(luminance + _ColorRampLuminosity);
|
||||
#if GRADIENTCOLORRAMP_ON
|
||||
col.rgb = lerp(col.rgb, tex2D(_ColorRampTexGradient, half2(luminance, 0)).rgb, _ColorRampBlend);
|
||||
#else
|
||||
col.rgb = lerp(col.rgb, tex2D(_ColorRampTex, half2(luminance, 0)).rgb, _ColorRampBlend);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if GREYSCALE_ON && GREYSCALEOUTLINE_ON
|
||||
luminance = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
|
||||
luminance = saturate(luminance + _GreyscaleLuminosity);
|
||||
col.rgb = lerp(col.rgb, half3(luminance, luminance, luminance) * _GreyscaleTintColor, _GreyscaleBlend);
|
||||
#endif
|
||||
|
||||
#if POSTERIZE_ON && POSTERIZEOUTLINE_ON
|
||||
col.rgb = pow(col.rgb, _PosterizeGamma) * _PosterizeNumColors;
|
||||
col.rgb = floor(col.rgb) / _PosterizeNumColors;
|
||||
col.rgb = pow(col.rgb, 1.0 / _PosterizeGamma);
|
||||
#endif
|
||||
|
||||
#if SHINE_ON
|
||||
half2 uvShine = uvRect;
|
||||
half cosAngle = cos(_ShineRotate);
|
||||
half sinAngle = sin(_ShineRotate);
|
||||
half2x2 rot = half2x2(cosAngle, -sinAngle, sinAngle, cosAngle);
|
||||
uvShine -= half2(0.5, 0.5);
|
||||
uvShine = mul(rot, uvShine);
|
||||
uvShine += half2(0.5, 0.5);
|
||||
half shineMask = SAMPLE_TEXTURE2D(_ShineMask, sampler_ShineMask, i.uv).a;
|
||||
half currentDistanceProjection = (uvShine.x + uvShine.y) / 2;
|
||||
half whitePower = 1 - (abs(currentDistanceProjection - _ShineLocation) / _ShineWidth);
|
||||
col.rgb += col.a * whitePower * _ShineGlow * max(sign(currentDistanceProjection - (_ShineLocation - _ShineWidth)), 0.0)
|
||||
* max(sign((_ShineLocation + _ShineWidth) - currentDistanceProjection), 0.0) * _ShineColor * shineMask;
|
||||
#endif
|
||||
|
||||
#if HOLOGRAM_ON
|
||||
half totalHologram = _HologramStripesAmount + _HologramUnmodAmount;
|
||||
half hologramYCoord = ((uvRect.y + (((_Time.x + randomSeed) % 1) * _HologramStripesSpeed)) % totalHologram) / totalHologram;
|
||||
hologramYCoord = abs(hologramYCoord);
|
||||
half alpha = RemapFloat(saturate(hologramYCoord - (_HologramUnmodAmount/totalHologram)), 0.0, 1.0, _HologramMinAlpha, saturate(_HologramMaxAlpha));
|
||||
half hologramMask = max(sign((_HologramUnmodAmount/totalHologram) - hologramYCoord), 0.0);
|
||||
half4 hologramResult = col;
|
||||
hologramResult.a *= lerp(alpha, 1, hologramMask);
|
||||
hologramResult.rgb *= max(1, _HologramMaxAlpha * max(sign(hologramYCoord - (_HologramUnmodAmount/totalHologram)), 0.0));
|
||||
hologramMask = 1 - step(0.01,hologramMask);
|
||||
hologramResult.rgb += hologramMask * _HologramStripeColor * col.a;
|
||||
col = lerp(col, hologramResult, _HologramBlend);
|
||||
#endif
|
||||
|
||||
#if FLICKER_ON
|
||||
col.a *= saturate(col.a * step(frac(0.05 + (_Time.w + randomSeed) * _FlickerFreq), 1 - _FlickerPercent) + _FlickerAlpha);
|
||||
#endif
|
||||
|
||||
col.a *= _Alpha;
|
||||
|
||||
#if ALPHACUTOFF_ON
|
||||
clip((1 - _AlphaCutoffValue) - (1 - col.a) - 0.01);
|
||||
#endif
|
||||
|
||||
#if ALPHAROUND_ON
|
||||
col.a = step(_AlphaRoundThreshold, col.a);
|
||||
#endif
|
||||
|
||||
#if ALPHAOUTLINE_ON
|
||||
half alphaOutlineRes = pow(1 - col.a, max(_AlphaOutlinePower, 0.0001)) * step(_AlphaOutlineMinAlpha, col.a) * _AlphaOutlineBlend;
|
||||
col.rgb = lerp(col.rgb, _AlphaOutlineColor.rgb * _AlphaOutlineGlow, alphaOutlineRes);
|
||||
col.a = lerp(col.a, 1, alphaOutlineRes > 1);
|
||||
#endif
|
||||
|
||||
col *= _Color;
|
||||
#if !defined(HDRP_PASS) && UNITY_VERSION >= 60000000
|
||||
col *= unity_SpriteColor;
|
||||
#endif
|
||||
|
||||
#if FOG_ON
|
||||
col = AllIn1MixFog(col, i.vertex, i.positionWS, i.fogCoord);
|
||||
#endif
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c219b648ae17310408a5f5ba5b099249
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/AllIn1SpriteShaderSRP_FragmentPass.hlsl
|
||||
uploadId: 857600
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#ifndef ALLIN1SPRITESHADERSRP_HDRPHELPER
|
||||
#define ALLIN1SPRITESHADERSRP_HDRPHELPER
|
||||
|
||||
//fogCoord only used in URP. It's here to make both functions have the same parameters
|
||||
float4 AllIn1MixFog(float4 inputColor, float4 clipPos, float3 positionWS, float fogCoord)
|
||||
{
|
||||
float4 res = inputColor;
|
||||
if (_FogEnabled)
|
||||
{
|
||||
PositionInputs posInput = GetPositionInput(
|
||||
clipPos.xy,
|
||||
_ScreenSize.zw,
|
||||
clipPos.z,
|
||||
clipPos.w,
|
||||
positionWS, //In HDRP is RWS
|
||||
0
|
||||
);
|
||||
|
||||
float3 V = GetWorldSpaceNormalizeViewDir(positionWS);
|
||||
|
||||
float3 fogColor;
|
||||
float3 fogOpacity;
|
||||
EvaluateAtmosphericScattering(posInput, V, fogColor, fogOpacity);
|
||||
|
||||
res.rgb = (res.rgb * fogOpacity) + fogColor;
|
||||
res.a *= (1 - fogOpacity);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif //ALLIN1SPRITESHADERSRP_HDRPHELPER
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2403e765aad6494d86eaaec9cdd5385
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/AllIn1SpriteShaderSRP_HDRPHelper.hlsl
|
||||
uploadId: 857600
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
#ifndef ALLIN1SPRITESHADERSRP_PROPERTIES
|
||||
#define ALLIN1SPRITESHADERSRP_PROPERTIES
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
half4 /*_MainTex_ST,*/ /*_MainTex_TexelSize,*/ _Color;
|
||||
float4 _MainTex_ScaleAndTiling;
|
||||
|
||||
half _Alpha;
|
||||
|
||||
half _MinXUV, _MaxXUV, _MinYUV, _MaxYUV;
|
||||
|
||||
half _RectSize;
|
||||
|
||||
half _OffsetUvX, _OffsetUvY;
|
||||
|
||||
half _ClipUvLeft, _ClipUvRight, _ClipUvUp, _ClipUvDown;
|
||||
|
||||
half _RadialStartAngle, _RadialClip, _RadialClip2;
|
||||
|
||||
half _TwistUvAmount, _TwistUvPosX, _TwistUvPosY, _TwistUvRadius;
|
||||
|
||||
half _RotateUvAmount;
|
||||
|
||||
half _FishEyeUvAmount;
|
||||
|
||||
half _PinchUvAmount;
|
||||
|
||||
half _HandDrawnAmount, _HandDrawnSpeed;
|
||||
|
||||
half _ShakeUvSpeed, _ShakeUvX, _ShakeUvY;
|
||||
|
||||
float _WaveAmount, _WaveSpeed, _WaveStrength, _WaveX, _WaveY;
|
||||
|
||||
half _RoundWaveStrength, _RoundWaveSpeed;
|
||||
|
||||
half _ZoomUvAmount;
|
||||
|
||||
half4 _FadeBurnColor; /*_FadeTex_ST,*/ /*_FadeBurnTex_ST*/
|
||||
float4 _FadeTex_ScaleAndTiling, _FadeBurnTex_ScaleAndTiling;
|
||||
half _FadeAmount, _FadeBurnWidth, _FadeBurnTransition, _FadeBurnGlow;
|
||||
|
||||
half _TextureScrollXSpeed, _TextureScrollYSpeed;
|
||||
|
||||
half4 _GlowColor;
|
||||
half _Glow, _GlowGlobal;
|
||||
|
||||
|
||||
half4 _OutlineColor;
|
||||
half _OutlineAlpha, _OutlineGlow, _OutlineWidth;
|
||||
int _OutlinePixelWidth;
|
||||
|
||||
//half4 _OutlineTex_ST;
|
||||
float4 _OutlineTex_ScaleAndTiling;
|
||||
half _OutlineTexXSpeed, _OutlineTexYSpeed;
|
||||
|
||||
//half4 _OutlineDistortTex_ST;
|
||||
float4 _OutlineDistortTex_ScaleAndTiling;
|
||||
half _OutlineDistortTexXSpeed, _OutlineDistortTexYSpeed, _OutlineDistortAmount;
|
||||
|
||||
//half4 _DistortTex_ST;
|
||||
float4 _DistortTex_ScaleAndTiling;
|
||||
half _DistortTexXSpeed, _DistortTexYSpeed, _DistortAmount;
|
||||
|
||||
half _WarpStrength, _WarpSpeed, _WarpScale;
|
||||
|
||||
half _GrassSpeed, _GrassWind, _GrassManualAnim, _GrassRadialBend;
|
||||
|
||||
half _GradBlend, _GradBoostX, _GradBoostY;
|
||||
half4 _GradTopRightCol, _GradTopLeftCol, _GradBotRightCol, _GradBotLeftCol;
|
||||
|
||||
half4 _ColorSwapRed, _ColorSwapGreen, _ColorSwapBlue;
|
||||
half _ColorSwapRedLuminosity, _ColorSwapGreenLuminosity, _ColorSwapBlueLuminosity, _ColorSwapBlend;
|
||||
|
||||
half _HsvShift, _HsvSaturation, _HsvBright;
|
||||
|
||||
half4 _HitEffectColor;
|
||||
half _HitEffectGlow, _HitEffectBlend;
|
||||
|
||||
half _PixelateSize;
|
||||
|
||||
half _NegativeAmount;
|
||||
|
||||
half _ColorRampLuminosity, _ColorRampBlend;
|
||||
|
||||
half _GreyscaleLuminosity, _GreyscaleBlend;
|
||||
half4 _GreyscaleTintColor;
|
||||
|
||||
half _PosterizeNumColors, _PosterizeGamma;
|
||||
|
||||
half _BlurIntensity;
|
||||
|
||||
half _MotionBlurAngle, _MotionBlurDist;
|
||||
|
||||
half _GhostColorBoost, _GhostTransparency, _GhostBlend;
|
||||
|
||||
half _AlphaOutlineGlow, _AlphaOutlinePower, _AlphaOutlineMinAlpha, _AlphaOutlineBlend;
|
||||
half4 _AlphaOutlineColor;
|
||||
|
||||
half _InnerOutlineThickness, _InnerOutlineAlpha, _InnerOutlineGlow;
|
||||
half4 _InnerOutlineColor;
|
||||
|
||||
half _HologramStripesAmount, _HologramMinAlpha, _HologramUnmodAmount, _HologramStripesSpeed, _HologramMaxAlpha, _HologramBlend;
|
||||
half4 _HologramStripeColor;
|
||||
|
||||
half _ChromAberrAmount, _ChromAberrAlpha;
|
||||
|
||||
half _GlitchAmount, _GlitchSize, _GlitchSpeed;
|
||||
|
||||
half _FlickerFreq, _FlickerPercent, _FlickerAlpha;
|
||||
|
||||
half _ShadowX, _ShadowY, _ShadowAlpha;
|
||||
half4 _ShadowColor;
|
||||
|
||||
half4 _ShineColor;
|
||||
half _ShineLocation, _ShineRotate, _ShineWidth, _ShineGlow;
|
||||
|
||||
half _AlphaCutoffValue;
|
||||
|
||||
half _AlphaRoundThreshold;
|
||||
|
||||
half4 _ColorChangeNewCol, _ColorChangeTarget;
|
||||
half _ColorChangeTolerance, _ColorChangeLuminosity;
|
||||
|
||||
half4 _ColorChangeNewCol2, _ColorChangeTarget2;
|
||||
half _ColorChangeTolerance2;
|
||||
|
||||
half4 _ColorChangeNewCol3, _ColorChangeTarget3;
|
||||
half _ColorChangeTolerance3;
|
||||
|
||||
half _Contrast, _Brightness;
|
||||
|
||||
//half4 _OverlayTex_ST;
|
||||
float4 _OverlayTex_ScaleAndTiling;
|
||||
float4 _OverlayColor;
|
||||
half _OverlayGlow, _OverlayBlend, _OverlayTextureScrollXSpeed, _OverlayTextureScrollYSpeed;
|
||||
|
||||
float _RandomSeed;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
#define CUSTOM_TRANSFORM_TEX(uv, st) uv * st.xy + st.zw
|
||||
#define GET_PIXEL(offsetX, offsetY, uv, tex, texelSize) SAMPLE_TEXTURE2D(tex, sampler##tex, uv + half2(offsetX * texelSize.x, offsetY * texelSize.y)).rgb
|
||||
#define DECLARE_TEX_AND_SAMPLER(texName) \
|
||||
TEXTURE2D(texName);\
|
||||
SAMPLER(sampler##texName);
|
||||
|
||||
|
||||
DECLARE_TEX_AND_SAMPLER(_MainTex)
|
||||
|
||||
#if FADE_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_FadeTex)
|
||||
DECLARE_TEX_AND_SAMPLER(_FadeBurnTex)
|
||||
#endif
|
||||
|
||||
#if GLOW_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_GlowTex)
|
||||
//sampler2D _GlowTex;
|
||||
#endif
|
||||
|
||||
#if OUTTEX_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_OutlineTex)
|
||||
#endif
|
||||
|
||||
#if OUTDIST_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_OutlineDistortTex)
|
||||
//sampler2D _OutlineDistortTex;
|
||||
#endif
|
||||
|
||||
#if DISTORT_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_DistortTex)
|
||||
//sampler2D _DistortTex;
|
||||
#endif
|
||||
|
||||
#if COLORSWAP_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_ColorSwapTex)
|
||||
#endif
|
||||
|
||||
#if COLORRAMP_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_ColorRampTex)
|
||||
DECLARE_TEX_AND_SAMPLER(_ColorRampTexGradient)
|
||||
#endif
|
||||
|
||||
#if SHINE_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_ShineMask)
|
||||
#endif
|
||||
|
||||
#if OVERLAY_ON
|
||||
DECLARE_TEX_AND_SAMPLER(_OverlayTex)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b6109d96c9d070479a709f48fb8ccce
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/AllIn1SpriteShaderSRP_Properties.hlsl
|
||||
uploadId: 857600
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
#ifndef ALLIN1SPRITESHADERSRP_SHADERFEATURES
|
||||
#define ALLIN1SPRITESHADERSRP_SHADERFEATURES
|
||||
|
||||
#pragma shader_feature_local GLOW_ON
|
||||
#pragma shader_feature_local FADE_ON
|
||||
#pragma shader_feature_local OUTBASE_ON
|
||||
#pragma shader_feature_local ONLYOUTLINE_ON
|
||||
#pragma shader_feature_local GRADIENT_ON
|
||||
#pragma shader_feature_local GRADIENT2COL_ON
|
||||
#pragma shader_feature_local RADIALGRADIENT_ON
|
||||
#pragma shader_feature_local COLORSWAP_ON
|
||||
#pragma shader_feature_local HSV_ON
|
||||
#pragma shader_feature_local CHANGECOLOR_ON
|
||||
#pragma shader_feature_local CHANGECOLOR2_ON
|
||||
#pragma shader_feature_local CHANGECOLOR3_ON
|
||||
#pragma shader_feature_local COLORRAMP_ON
|
||||
#pragma shader_feature_local GRADIENTCOLORRAMP_ON
|
||||
#pragma shader_feature_local HITEFFECT_ON
|
||||
#pragma shader_feature_local NEGATIVE_ON
|
||||
#pragma shader_feature_local PIXELATE_ON
|
||||
#pragma shader_feature_local GREYSCALE_ON
|
||||
#pragma shader_feature_local POSTERIZE_ON
|
||||
#pragma shader_feature_local BLUR_ON
|
||||
#pragma shader_feature_local MOTIONBLUR_ON
|
||||
#pragma shader_feature_local GHOST_ON
|
||||
#pragma shader_feature_local ALPHAOUTLINE_ON
|
||||
#pragma shader_feature_local INNEROUTLINE_ON
|
||||
#pragma shader_feature_local ONLYINNEROUTLINE_ON
|
||||
#pragma shader_feature_local HOLOGRAM_ON
|
||||
#pragma shader_feature_local CHROMABERR_ON
|
||||
#pragma shader_feature_local GLITCH_ON
|
||||
#pragma shader_feature_local FLICKER_ON
|
||||
#pragma shader_feature_local SHADOW_ON
|
||||
#pragma shader_feature_local SHINE_ON
|
||||
#pragma shader_feature_local CONTRAST_ON
|
||||
#pragma shader_feature_local OVERLAY_ON
|
||||
#pragma shader_feature_local OVERLAYMULT_ON
|
||||
#pragma shader_feature_local ALPHACUTOFF_ON
|
||||
#pragma shader_feature_local ALPHAROUND_ON
|
||||
#pragma shader_feature_local DOODLE_ON
|
||||
#pragma shader_feature_local WIND_ON
|
||||
#pragma shader_feature_local WAVEUV_ON
|
||||
#pragma shader_feature_local ROUNDWAVEUV_ON
|
||||
#pragma shader_feature_local RECTSIZE_ON
|
||||
#pragma shader_feature_local OFFSETUV_ON
|
||||
#pragma shader_feature_local CLIPPING_ON
|
||||
#pragma shader_feature_local RADIALCLIPPING_ON
|
||||
#pragma shader_feature_local TEXTURESCROLL_ON
|
||||
#pragma shader_feature_local ZOOMUV_ON
|
||||
#pragma shader_feature_local DISTORT_ON
|
||||
#pragma shader_feature_local WARP_ON
|
||||
#pragma shader_feature_local TWISTUV_ON
|
||||
#pragma shader_feature_local ROTATEUV_ON
|
||||
#pragma shader_feature_local POLARUV_ON
|
||||
#pragma shader_feature_local FISHEYE_ON
|
||||
#pragma shader_feature_local PINCH_ON
|
||||
#pragma shader_feature_local SHAKEUV_ON
|
||||
|
||||
#pragma shader_feature_local GLOWTEX_ON
|
||||
#pragma shader_feature_local OUTTEX_ON
|
||||
#pragma shader_feature_local OUTDIST_ON
|
||||
#pragma shader_feature_local OUTBASE8DIR_ON
|
||||
#pragma shader_feature_local OUTBASEPIXELPERF_ON
|
||||
#pragma shader_feature_local COLORRAMPOUTLINE_ON
|
||||
#pragma shader_feature_local GREYSCALEOUTLINE_ON
|
||||
#pragma shader_feature_local POSTERIZEOUTLINE_ON
|
||||
#pragma shader_feature_local BLURISHD_ON
|
||||
#pragma shader_feature_local MANUALWIND_ON
|
||||
#pragma shader_feature ATLAS_ON
|
||||
#pragma shader_feature PREMULTIPLYALPHA_ON
|
||||
|
||||
#pragma shader_feature BILBOARD_ON
|
||||
#pragma shader_feature BILBOARDY_ON
|
||||
#pragma shader_feature FOG_ON
|
||||
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb77b0e21e6914b448db01edf0081e34
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/AllIn1SpriteShaderSRP_ShaderFeatures.hlsl
|
||||
uploadId: 857600
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#ifndef ALLIN1SPRITESHADERSRP_STRUCTS
|
||||
#define ALLIN1SPRITESHADERSRP_STRUCTS
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
half4 color : COLOR;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 vertex : SV_POSITION;
|
||||
half4 color : COLOR;
|
||||
|
||||
#if OUTTEX_ON
|
||||
half2 uvOutTex : TEXCOORD1;
|
||||
#endif
|
||||
|
||||
#if OUTDIST_ON
|
||||
half2 uvOutDistTex : TEXCOORD2;
|
||||
#endif
|
||||
|
||||
#if DISTORT_ON
|
||||
half2 uvDistTex : TEXCOORD3;
|
||||
#endif
|
||||
|
||||
#if FOG_ON
|
||||
float fogCoord : TEXCOORD4;
|
||||
#endif
|
||||
|
||||
float3 positionWS : TEXCOORD5;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
#endif
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90c9bb4f3a943e54ab9fe837a2ffe287
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 156513
|
||||
packageName: All In 1 Sprite Shader
|
||||
packageVersion: 4.661
|
||||
assetPath: Assets/Plugins/AllIn1SpriteShader/Shaders/ShaderLibrary/AllIn1SpriteShaderSRP_Structs.hlsl
|
||||
uploadId: 857600
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#ifndef ALLIN1SPRITESHADERSRP_URPHELPER
|
||||
#define ALLIN1SPRITESHADERSRP_URPHELPER
|
||||
|
||||
//clipPos and positionWS only used in HDRP. They're here to make both functions have the same parameters
|
||||
float4 AllIn1MixFog(float4 inputColor, float4 clipPos, float3 positionWS, float fogCoord)
|
||||
{
|
||||
float4 res = inputColor;
|
||||
|
||||
res.rgb = MixFog(inputColor.rgb, fogCoord);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif //ALLIN1SPRITESHADERSRP_URPHELPER
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user