rc.glsl 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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. /* Установите режим непрозрачности фона окна. Возможные значения:
  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. /* Следует ли усреднять и зеркалировать левый и правый входные аудиоканалы.
  30. Это может привести к тому, что некоторые модули будут отображать только один канал. */
  31. #request setmirror false
  32. /* OpenGL context and GLSL shader versions, do not change unless
  33. you *absolutely* know what you are doing. Вот эту хрень вроде не надо трогать если шаришь */
  34. #request setversion 3 3
  35. #request setshaderversion 330
  36. /* Заголовок окна */
  37. #request settitle "GLava"
  38. /* Геометрия окна (x, y, width, height) */
  39. #request setgeometry 0 0 960 445
  40. /* Фон окна (RGBA format).
  41. Does not work with `setopacity "xroot"` */
  42. #request setbg 00000000
  43. /* (X11 only) Тип окна, возможные значения. Это для умных:
  44. "desktop", "dock", "toolbar", "menu",
  45. "utility", "splash", "dialog", "normal"
  46. This will set _NET_WM_WINDOW_TYPE to _NET_WM_WINDOW_TYPE_(TYPE),
  47. where (TYPE) is the one of the window types listed (after being
  48. converted to uppercase).
  49. Alternatively, you can set this value to "!", which will cause
  50. the window to be unmanaged. If this is set, then `addxwinstate`
  51. will do nothing, but you can use "!+" and "!-" to stack on top
  52. or below other windows.
  53. */
  54. #request setxwintype "normal"
  55. /* (X11 only) EWMH Window state atoms (multiple can be specified) А это для очень умных.
  56. Possible values are:
  57. "modal", "sticky", "maximized_vert", "maximized_horz",
  58. "shaded", "skip_taskbar", "skip_pager", "hidden", "fullscreen",
  59. "above", "below", "demands_attention", "focused", "pinned"
  60. This will add _NET_WM_STATE_(TYPE) atoms to _NET_WM_STATE,
  61. where (TYPE) is one of the window states listed (after being
  62. converted to uppercase).
  63. The lines below (commented out by default) are of relevance
  64. if you are trying to get GLava to behave as a desktop widget
  65. and your WM is not correctly responding to the "desktop" value
  66. for `setxwintype`.
  67. */
  68. // #request addxwinstate "sticky"
  69. // #request addxwinstate "skip_taskbar"
  70. // #request addxwinstate "skip_pager"
  71. // #request addxwinstate "above"
  72. // #request addxwinstate "pinned"
  73. /* (X11 only) Use the XShape extension to support clicking through
  74. the GLava window. Useful when you want to interact with other
  75. desktop windows (icons, menus, desktop shells). Enabled by
  76. default when GLava itself is a desktop window. */
  77. #request setclickthrough false
  78. /* Audio source где то тут можно прикрутить альсу, а лучше вообще ничего не трогать.
  79. When the "pulseaudio" backend is set, this can be a number or
  80. a name of an audio sink or device to record from. Set to "auto"
  81. to use the default output device.
  82. When the "fifo" backend is set, "auto" is interpreted as
  83. "/tmp/mpd.fifo". Otherwise, a valid path should be provided. */
  84. #request setsource "auto"
  85. /* Buffer swap interval (vsync), set to '0' to prevent
  86. waiting for refresh, '1' (or more) to wait for the specified
  87. amount of frames. */
  88. #request setswap 1
  89. /* Linear interpolation for audio data frames. Drastically
  90. improves smoothness with configurations that yield low UPS
  91. (`setsamplerate` and `setsamplesize`), or monitors that have
  92. high refresh rates.
  93. This feature itself, however, will effect performance as it
  94. will have to interpolate data every frame on the CPU. It will
  95. automatically (and temporarily) disable itself if the update
  96. rate is close to, or higher than the framerate:
  97. if (update_rate / frame_rate > 0.9) disable_interpolation;
  98. This will delay data output by one update frame, so it can
  99. desync audio with visual effects on low UPS configs. */
  100. #request setinterpolate false
  101. /* Frame limiter, set to the frames per second (FPS) desired or
  102. simply set to zero (or lower) to disable the frame limiter. */
  103. #request setframerate 0
  104. /* Suspends rendering if a fullscreen window is focused while
  105. GLava is still visible (ie. on another monitor). This prevents
  106. rendering from interfering with other graphically intensive
  107. tasks.
  108. If GLava is minimized or completely obscured, it will not
  109. render regardless of this option. */
  110. #request setfullscreencheck false
  111. /* Enable/disable printing framerate every second. 'FPS' stands
  112. for 'Frames Per Second', and 'UPS' stands for 'Updates Per
  113. Second'. Updates are performed when new data is submitted
  114. by pulseaudio, and require transformations to be re-applied
  115. (thus being a good measure of how much work your CPU has to
  116. perform over time) */
  117. #request setprintframes true
  118. /* PulseAudio sample buffer size. Lower values result in more
  119. frequent audio updates (also depends on sampling rate), but
  120. will also require all transformations to be applied much
  121. more frequently (CPU intensive).
  122. High (>2048, with 22050 Hz) values will decrease accuracy
  123. (as some signals can be missed by transformations like FFT)
  124. The following settings (@22050 Hz) produce the listed rates:
  125. Sample UPS Description
  126. - 2048 -> 43.0 (low accuracy, cheap), use with < 60 FPS
  127. - 1024 -> 86.1 (high accuracy, expensive), use with >= 60 FPS
  128. - 512 -> 172.3 (extreme accuracy, very expensive), use only
  129. for graphing accurate spectrum data with
  130. custom modules.
  131. If the framerate drops below the update rate, the update rate
  132. will be locked to the framerate (to prevent wasting CPU time).
  133. This behaviour means you can use a 1024 sample size on a 60Hz
  134. monitor with vsync enabled to get 60FPS and 60UPS.
  135. For high refresh rate monitors (120+ Hz), it's recommended to
  136. also stick with the 1024 sample size and use interpolation to
  137. smooth the data, as accuracy beyond this setting is mostly
  138. meaningless for visual purposes.
  139. */
  140. #request setsamplesize 512
  141. /* Audio buffer size to be used for processing and shaders.
  142. Increasing this value can have the effect of adding 'gravity'
  143. to FFT output, as the audio signal will remain in the buffer
  144. longer.
  145. This value has a _massive_ effect on FFT performance and
  146. quality for some modules. */
  147. #request setbufsize 4096
  148. /* PulseAudio sample rate. Lower values can add 'gravity' to
  149. FFT output, but can also reduce accuracy. Most hardware
  150. samples at 44100Hz.
  151. Lower sample rates also can make output more choppy, when
  152. not using interpolation. It's generally OK to leave this
  153. value unless you have a strange PulseAudio configuration.
  154. This option does nothing when using the "fifo" audio
  155. backend. Instead, an ideal rate should be be configured
  156. in the application generating the output. */
  157. #request setsamplerate 22050
  158. /* Enable GPU acceleration of the audio buffer's fourier transform.
  159. This drastically reduces CPU usage, but should be avoided on
  160. old integrated graphics hardware.
  161. Enabling this also enables acceleration for post-FFT processing
  162. effects, such as gravity, averaging, windowing, and interpolation. */
  163. #request setaccelfft true
  164. /* ** DEPRECATED **
  165. Force window geometry (locking the window in place), useful
  166. for some pesky WMs that try to reposition the window when
  167. embedding in the desktop.
  168. This routinely sends X11 events and should be avoided. */
  169. #request setforcegeometry false
  170. /* ** DEPRECATED **
  171. Force window to be raised (focused in some WMs), useful for
  172. WMs that have their own stacking order for desktop windows.
  173. This routinely sends X11 events and should be avoided. */
  174. #request setforceraised false
  175. /* ** DEPRECATED **
  176. Scale down the audio buffer before any operations are
  177. performed on the data. Higher values are faster.
  178. This value can affect the output of various transformations,
  179. since it applies (crude) averaging to the data when shrinking
  180. the buffer. It is reccommended to use `setsamplerate` and
  181. `setsamplesize` to improve performance or accuracy instead. */
  182. #request setbufscale 1