From 847f26b2a129594aaadd2b15da05a3e9bc345a10 Mon Sep 17 00:00:00 2001 From: Rakarake Date: Sun, 15 Mar 2026 16:24:12 +0100 Subject: [PATCH] docs --- examples/simple.glsl | 4 ++++ glonkers.1 | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 examples/simple.glsl 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