diff --git a/examples/simple.glsl b/examples/simple.glsl new file mode 100644 index 0000000..859c181 --- /dev/null +++ b/examples/simple.glsl @@ -0,0 +1,4 @@ +void mainImage(out vec4 fragColor, in vec2 fragCoord) { + fragColor = vec4(fragCoord / iResolution.xy, 1.0, 1.0); +} + diff --git a/glonkers.1 b/glonkers.1 index 4aaf23c..11ad09f 100644 --- a/glonkers.1 +++ b/glonkers.1 @@ -1,8 +1,24 @@ .TH glonkers 1 "February 2026" "1.0" "glonkers man page" + .SH NAME glonkers \- Create windows and wallpapers with glsl fragment shaders. + .SH SYNOPSIS glonkers [OPTIONS]... [FILE] + +.SH DESCRIPTION +The wallpaper feature only works on wayland compositors that implement the +wlr-layer-shell protocol. +A simple shader file looks something like this: + +.EX +void mainImage(out vec4 fragColor, in vec2 fragCoord) { + fragColor = vec4(fragCoord / iResolution.xy, 1.0, 1.0); +} +.EE + +The iResolution is one of the built in shader inputs. + .SH OPTIONS .PP @@ -38,7 +54,7 @@ shader with iChannel0, iChannel1, iChannel2, iChannel3. Stop listing outputs/textures. .RE -.SH SHADER BUILTINS +.SH SHADER INPUTS .PP \fBiTime\fR : float