"use strict";(globalThis.webpackChunk_plex_client_qt=globalThis.webpackChunk_plex_client_qt||[]).push([["packages_visualizer_shaders_bars_glsl"],{87159:n=>{n.exports="// Shamelessly stolen and modified from https://www.shadertoy.com/view/4lGSzy\n\nprecision mediump float;\n\nuniform float uTime;\nuniform vec2 uResolution;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nuniform sampler2D uSampler;\n\nfloat noise3D(vec3 p)\n{\n  return fract(sin(dot(p ,vec3(12.9898,78.233,12.7378))) * 43758.5453)*2.0-1.0;\n}\n\nvec3 mixc(vec3 col1, vec3 col2, float v)\n{\n  v = clamp(v,0.0,1.0);\n  return col1+v*(col2-col1);\n}\n\nvoid main( void )\n{\n  vec2 uv = vec2(vTextureCoord.x, 1.0 - vTextureCoord.y);\n  vec2 p = uv*2.0-1.0;\n  p.x*=uResolution.x/uResolution.y;\n  p.y+=0.5;\n\n  vec3 col = vec3(0.0);\n  vec3 ref = vec3(0.0);\n\n  float nBands = 64.0;\n  float i = floor(uv.x*nBands);\n  float f = fract(uv.x*nBands);\n  float band = i/nBands;\n  band *= band*band;\n  band = band*0.995;\n  band += 0.005;\n  float s = texture2D( uSampler, vec2(band,0.25) ).x;\n\n  /* Gradient colors and amount here */\n  const int nColors = 4;\n  vec3 colors[nColors];\n  colors[0] = vec3(0.0,0.0,1.0);\n  colors[1] = vec3(0.0,1.0,1.0);\n  colors[2] = vec3(1.0,1.0,0.0);\n  colors[3] = vec3(1.0,0.0,0.0);\n\n  vec3 gradCol = colors[0];\n  float n = float(nColors)-1.0;\n  for(int i = 1; i < nColors; i++)\n  {\n  gradCol = mixc(gradCol,colors[i],(s-float(i-1)/n)*n);\n  }\n\n  col += vec3(1.0-smoothstep(0.0,0.01,p.y-s*1.5));\n  col *= gradCol;\n\n  ref += vec3(1.0-smoothstep(0.0,-0.01,p.y+s*1.5));\n  ref*= gradCol*smoothstep(-0.5,0.5,p.y);\n\n  col = mix(ref,col,smoothstep(-0.01,0.01,p.y));\n\n  col *= smoothstep(0.125,0.375,f);\n  col *= smoothstep(0.875,0.625,f);\n\n  col = clamp(col, 0.0, 1.0);\n\n  float dither = noise3D(vec3(p,uTime))*2.0/256.0;\n  col += dither;\n\n  gl_FragColor = vec4(col,1.0);\n}\n"}}]);