rc.glsl 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. /* The module to use. A module is a set of shaders used to produce
  2. the visualizer. The structure for a module is the following:
  3. module_name [directory]
  4. 1.frag [file: fragment shader],
  5. 2.frag [file: fragment shader],
  6. ...
  7. Shaders are loaded in numerical order, starting at '1.frag',
  8. continuing indefinitely. The results of each shader (except
  9. for the final pass) is given to the next shader in the list
  10. as a 2D sampler.
  11. See documentation for more details. */
  12. #request mod bars
  13. /* Window hints */
  14. #request setfloating false
  15. #request setdecorated true
  16. #request setfocused false
  17. #request setmaximized false
  18. /* Set window background opacity mode. Possible values are:
  19. "native" - True transparency provided by the compositor. Can
  20. reduce performance on some systems, depending on
  21. the compositor used.
  22. "xroot" - Maintain a copy of the root window's pixmap
  23. (usually the desktop background) to provide a
  24. pseudo-transparent effect. Useful when no compositor
  25. is available or native transparency isn't nessecary.
  26. Has very little performance impact.
  27. "none" - Disable window opacity completely. */
  28. #request setopacity "native"
  29. /* Whether to mirror left and right audio input channels from PulseAudio.*/
  30. #request setmirror false
  31. /* OpenGL context and GLSL shader versions, do not change unless
  32. you *absolutely* know what you are doing. */
  33. #request setversion 3 3
  34. #request setshaderversion 330
  35. /* Window title */
  36. #request settitle "GLava"
  37. /* Window geometry (x, y, width, height) */
  38. #request setgeometry 900 0 260 80
  39. /* Window background color (RGB format).
  40. Does not work with `setopacity "xroot"` */
  41. #request setbg 00000000
  42. /* (X11 only) EWMH Window type. Possible values are:
  43. "desktop", "dock", "toolbar", "menu",
  44. "utility", "splash", "dialog", "normal"
  45. This will set _NET_WM_WINDOW_TYPE to _NET_WM_WINDOW_TYPE_(TYPE),
  46. where (TYPE) is the one of the window types listed (after being
  47. converted to uppercase).
  48. Alternatively, you can set this value to "!", which will cause
  49. the window to be unmanaged. If this is set, then `addxwinstate`
  50. will do nothing, but you can use "!+" and "!-" to stack on top
  51. or below other windows.
  52. */
  53. #request setxwintype "desktop"
  54. /* (X11 only) EWMH Window state atoms (multiple can be specified).
  55. Possible values are:
  56. "modal", "sticky", "maximized_vert", "maximized_horz",
  57. "shaded", "skip_taskbar", "skip_pager", "hidden", "fullscreen",
  58. "above", "below", "demands_attention", "focused", "pinned"
  59. This will add _NET_WM_STATE_(TYPE) atoms to _NET_WM_STATE,
  60. where (TYPE) is one of the window states listed (after being
  61. converted to uppercase).
  62. The lines below (commented out by default) are of relevance
  63. if you are trying to get GLava to behave as a desktop widget
  64. and your WM is not correctly responding to the "desktop" value
  65. for `setxwintype`.
  66. */
  67. // #request addxwinstate "sticky"
  68. // #request addxwinstate "skip_taskbar"
  69. // #request addxwinstate "skip_pager"
  70. #request addxwinstate "above"
  71. // #request addxwinstate "pinned"
  72. /* (X11 only) Use the XShape extension to support clicking through
  73. the GLava window. Useful when you want to interact with other
  74. desktop windows (icons, menus, desktop shells). Enabled by
  75. default when GLava itself is a desktop window. */
  76. #request setclickthrough false
  77. /* Audio source
  78. When the "pulseaudio" backend is set, this can be a number or
  79. a name of an audio sink or device to record from. Set to "auto"
  80. to use the default output device.
  81. When the "fifo" backend is set, "auto" is interpreted as
  82. "/tmp/mpd.fifo". Otherwise, a valid path should be provided. */
  83. #request setsource "0"
  84. /* Buffer swap interval (vsync), set to '0' to prevent
  85. waiting for refresh, '1' (or more) to wait for the specified
  86. amount of frames. */
  87. #request setswap 0
  88. /* Linear interpolation for audio data frames. Drastically
  89. improves smoothness with configurations that yield low UPS
  90. (`setsamplerate` and `setsamplesize`), or monitors that have
  91. high refresh rates.
  92. This feature itself, however, will effect performance as it
  93. will have to interpolate data every frame on the CPU. It will
  94. automatically (and temporarily) disable itself if the update
  95. rate is close to, or higher than the framerate:
  96. if (update_rate / frame_rate > 0.9) disable_interpolation;
  97. This will delay data output by one update frame, so it can
  98. desync audio with visual effects on low UPS configs. */
  99. #request setinterpolate true
  100. /* Frame limiter, set to the frames per second (FPS) desired or
  101. simply set to zero (or lower) to disable the frame limiter. */
  102. #request setframerate 144
  103. /* Suspends rendering if a fullscreen window is focused while
  104. GLava is still visible (ie. on another monitor). This prevents
  105. rendering from interfering with other graphically intensive
  106. tasks.
  107. If GLava is minimized or completely obscured, it will not
  108. render regardless of this option. */
  109. #request setfullscreencheck false
  110. /* Enable/disable printing framerate every second. 'FPS' stands
  111. for 'Frames Per Second', and 'UPS' stands for 'Updates Per
  112. Second'. Updates are performed when new data is submitted
  113. by pulseaudio, and require transformations to be re-applied
  114. (thus being a good measure of how much work your CPU has to
  115. perform over time) */
  116. #request setprintframes true
  117. /* PulseAudio sample buffer size. Lower values result in more
  118. frequent audio updates (also depends on sampling rate), but
  119. will also require all transformations to be applied much
  120. more frequently (CPU intensive).
  121. High (>2048, with 22050 Hz) values will decrease accuracy
  122. (as some signals can be missed by transformations like FFT)
  123. The following settings (@22050 Hz) produce the listed rates:
  124. Sample UPS Description
  125. - 2048 -> 43.0 (low accuracy, cheap), use with < 60 FPS
  126. - 1024 -> 86.1 (high accuracy, expensive), use with >= 60 FPS
  127. - 512 -> 172.3 (extreme accuracy, very expensive), use only
  128. for graphing accurate spectrum data with
  129. custom modules.
  130. If the framerate drops below the update rate, the update rate
  131. will be locked to the framerate (to prevent wasting CPU time).
  132. This behaviour means you can use a 1024 sample size on a 60Hz
  133. monitor with vsync enabled to get 60FPS and 60UPS.
  134. For high refresh rate monitors (120+ Hz), it's recommended to
  135. also stick with the 1024 sample size and use interpolation to
  136. smooth the data, as accuracy beyond this setting is mostly
  137. meaningless for visual purposes.
  138. */
  139. #request setsamplesize 512
  140. /* Audio buffer size to be used for processing and shaders.
  141. Increasing this value can have the effect of adding 'gravity'
  142. to FFT output, as the audio signal will remain in the buffer
  143. longer.
  144. This value has a _massive_ effect on FFT performance and
  145. quality for some modules. */
  146. #request setbufsize 1024
  147. /* PulseAudio sample rate. Lower values can add 'gravity' to
  148. FFT output, but can also reduce accuracy. Most hardware
  149. samples at 44100Hz.
  150. Lower sample rates also can make output more choppy, when
  151. not using interpolation. It's generally OK to leave this
  152. value unless you have a strange PulseAudio configuration.
  153. This option does nothing when using the "fifo" audio
  154. backend. Instead, an ideal rate should be be configured
  155. in the application generating the output. */
  156. #request setsamplerate 44100
  157. /* ** DEPRECATED **
  158. Force window geometry (locking the window in place), useful
  159. for some pesky WMs that try to reposition the window when
  160. embedding in the desktop.
  161. This routinely sends X11 events and should be avoided. */
  162. #request setforcegeometry false
  163. /* ** DEPRECATED **
  164. Force window to be raised (focused in some WMs), useful for
  165. WMs that have their own stacking order for desktop windows.
  166. This routinely sends X11 events and should be avoided. */
  167. #request setforceraised false
  168. /* ** DEPRECATED **
  169. Scale down the audio buffer before any operations are
  170. performed on the data. Higher values are faster.
  171. This value can affect the output of various transformations,
  172. since it applies (crude) averaging to the data when shrinking
  173. the buffer. It is reccommended to use `setsamplerate` and
  174. `setsamplesize` to improve performance or accuracy instead. */
  175. #request setbufscale 1