graph.glsl 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /* Vertical scale, larger values will amplify output */
  2. #define VSCALE 160
  3. /* Rendering direction, either -1 (outwards) or 1 (inwards). */
  4. #define DIRECTION 1
  5. /* Color gradient scale, (optionally) used in `COLOR` macro */
  6. #define GRADIENT_SCALE 40
  7. /* Color definition. By default this is a gradient formed by mixing two colors.
  8. `pos` represents the pixel position relative to the visualizer baseline. */
  9. #define COLOR mix(#00aa5f33, #ff00783b, clamp(pos / GRADIENT_SCALE, 0, 1))
  10. /* 1 to draw outline, 0 to disable */
  11. #define DRAW_OUTLINE 0
  12. /* 1 to draw edge highlight, 0 to disable */
  13. #define DRAW_HIGHLIGHT 1
  14. /* Whether to anti-alias the border of the graph, creating a smoother curve.
  15. This may have a small impact on performance.
  16. Note: requires `xroot` or `none` opacity to be set */
  17. #define ANTI_ALIAS 1
  18. /* outline color */
  19. #define OUTLINE #00ff9c
  20. /* 1 to join the two channels together in the middle, 0 to clamp both down to zero */
  21. #define JOIN_CHANNELS 1
  22. /* 1 to invert (vertically), 0 otherwise */
  23. #define INVERT 1
  24. /* Gravity step, overrude from `smooth_parameters.glsl` */
  25. #request setgravitystep 8
  26. /* Smoothing factor, override from `smooth_parameters.glsl` */
  27. #request setsmoothfactor 0.15