Loading…
None
Source string added |
English (United Kingdom) (en_gb) | English (United Kingdom) (en_gb) | ||
---|---|---|---|
No related strings found in the glossary. |
Context
#30038Source string description
Help text about showing the JSON-formatted preset file in a text window. Same text also on visualization.shadertoy/resources/presets.json.md, for here only in Kodi's format style and colored code example!Flags
read-only
The file [B]presets.json[/B] is used to define custom shaders.
A custom path to the shader files (GLSL) can be declared in the add-on settings.
Contents of [B]presets.json[/B] should be:
[I] 1.[/I] Name of preset. Either hardcoded string or defined in [I]resources/language/.../strings.po[/I]
[I] 2.[/I] GLSL shader to use. If no custom path was declared, the default [B]resources/[/B] will be used. Set custom path to './' to use shaders from the same path as your [B]presets.json[/B] file.
[I] 3.[/I] Channel value 0. Defines the texture to use (e.g. PNG file). Can also be set to "audio" to pass related stream data within texture. The PNG and GLSL files should be located in the same directory.
[I] 4.[/I] Channel value 1 definition.
[I] 5.[/I] Channel value 2 definition.
[I] 6.[/I] Channel value 3 definition.
[I] 7.[/I] [I][Optional][/I] append string [B]"gl_only"[/B] to make this preset only available to OpenGL.
[B]Example:[/B]
[COLOR white][COLOR green]{[/COLOR] [COLOR blue]"presets"[/COLOR]:[
[COLOR gray]/* Default way used by the addon itself */[/COLOR]
[ [COLOR red]"The Disco Tunnel by poljere"[/COLOR], [COLOR red]"discotunnel.frag.glsl"[/COLOR], [COLOR red]"tex02.png"[/COLOR], [COLOR red]"tex15.png"[/COLOR], [COLOR red]"audio"[/COLOR], [COLOR red]""[/COLOR] ],
[COLOR gray]/* Description defined in strings.po */[/COLOR]
[ 30100, [COLOR red]"audioeclipse.frag.glsl"[/COLOR], [COLOR red]"audio"[/COLOR], [COLOR red]""[/COLOR], [COLOR red]""[/COLOR], [COLOR red]""[/COLOR] ],
[COLOR gray]/* Define custom file paths */[/COLOR]
[ [COLOR red]"My own one"[/COLOR], [COLOR red]"/path/to/glsl/my.frag.glsl"[/COLOR], [COLOR red]"audio"[/COLOR], [COLOR red]"/path/to/pngs/my_image.png"[/COLOR], [COLOR red]""[/COLOR], [COLOR red]""[/COLOR] ],
[COLOR gray]/* Preset only available to OpenGL (see 7) */[/COLOR]
[ [COLOR red]"Polar Beats by sauj123"[/COLOR], [COLOR red]"polarbeats.frag.glsl"[/COLOR], [COLOR red]"audio"[/COLOR], [COLOR red]""[/COLOR], [COLOR red]""[/COLOR], [COLOR red]""[/COLOR], [COLOR red]"gl_only"[/COLOR] ],
[COLOR gray]/* GLSL and PNG files are in the same folder as presets.json */[/COLOR]
[ [COLOR red]"Another one"[/COLOR], [COLOR red]"./another.frag.glsl"[/COLOR], [COLOR red]"./my_01.png"[/COLOR], [COLOR red]"./my_02.png"[/COLOR], [COLOR red]"audio"[/COLOR], [COLOR red]""[/COLOR] ],
[COLOR gray]/* Select texture image by file name, use default "resources/" dir */[/COLOR]
[ [COLOR red]"Fractal Land by Kali"[/COLOR], [COLOR red]"fractalland.frag.glsl"[/COLOR], [COLOR red]"tex02.png"[/COLOR], [COLOR red]"tex15.png"[/COLOR], [COLOR red]"audio"[/COLOR], [COLOR red]""[/COLOR] ]
][COLOR green]}[/COLOR][/COLOR]