Koala BG effects API
====================


The filename needs to have the extension .fx.xml - the filename also gets used to sort the effects, so please make sure you don't go before "00. default.fx.xml" when sorting.

It's an xml file with glsl code in it. The kind of GLSL is not totally standard, see other examples for what built-in functions and variables are called, they're mostly the standard.

If using sublimetext or another text editor that supports it, it may be helpful to set the language/syntax highlighting to GLSL otherwise it will auto detect as xml and the commenting shortcut etc will be less helpful without it.


format:

<!-- 
	needs-play-button="true" is optional, it adds a play button to the effect's UI,
	so you can press play if the effect does something different when the track is playing
	like scrolling etc.
-->
<koala-bg-plugin name="(your plugin's name)" needs-play-button="true">
	
	<uniforms>
		<!-- 
			there are a few optional built-in uniforms you can include in your shader.
			You can have as many of these as you want.

			iTime 		- time elapsed in seconds.
			audioLevel 	- current output volume of signal (0-1 range)
			scroll 		- scroll position, only advances when playing, moves faster with bpm
		-->
		<uniform name="(uniform 1)" />
		<uniform name="(uniform 2)" />
	</uniforms>

	<sliders>
		<!-- 
			You can have up to 2 sliders, they always go between 0 and 1.
			They have a name which is presented in the ui as well as being
			the name of the float uniform in the shader. This section is 
			totally optional.

			If you add a slider called speed, it will not appear as a uniform
			but affect the speed of the "scroll" uniform
		-->
		<slider name="numLoops" value="0.5" />
		<slider name="speed" value="0.5" />
	</sliders>
	<vert>
		// vert glsl shader code
	</vert>
	<frag>
		// frag glsl shader code
	</frag>
</koala-bg-plugin>