diff --git a/Home.md b/Home.md index 77f6672..f42c752 100644 --- a/Home.md +++ b/Home.md @@ -17,24 +17,39 @@ This wiki is written for people using the system during setup, look building, re | Shader | Main Use | | --- | --- | +| [Anamorphic Desqueeze](Shader-Anamorphic-Desqueeze) | Desqueeze anamorphic footage with fit/fill framing. | +| [Balatro Swirl](Shader-Balatro-Swirl) | Animated painterly generative swirl. | | [Black and White](Shader-Black-and-White) | Fast monochrome conversion. | +| [Broken Shader Example](Shader-Broken-Shader-Example) | Intentionally invalid diagnostics package. | | [Composition Guides](Shader-Composition-Guides) | Rule-of-thirds and center framing overlays. | | [Data Mosh](Shader-Data-Mosh) | Temporal block smear and chroma glitch. | | [DVD Bounce](Shader-DVD-Bounce) | Transparent bouncing DVD logo overlay. | +| [Ether](Shader-Ether) | Raymarched generative ether field. | | [False Color](Shader-False-Color) | Exposure and luma debugging. | +| [Fisheye Equirectangular Mirror](Shader-Fisheye-Equirectangular-Mirror) | Single-fisheye to 360x180 equirectangular unwrap. | | [Fisheye Reproject](Shader-Fisheye-Reproject) | Fisheye-to-virtual-camera reprojection. | | [Gaussian Blur](Shader-Gaussian-Blur) | Soft blur with radius, strength, and sample control. | | [Greenscreen Key](Shader-Greenscreen-Key) | Green screen alpha key with despill. | +| [Happy Accident](Shader-Happy-Accident) | Raymarched generative line field. | +| [Lift Gamma Gain](Shader-Lift-Gamma-Gain) | Color grading controls for shadows, midtones, highlights, and offset. | +| [3D LUT Apply](Shader-3D-LUT-Apply) | Apply a packaged `.cube` LUT. | +| [Multipass Test](Shader-Multipass-Test) | Diagnostic two-pass render example. | | [Pixelate](Shader-Pixelate) | Low-resolution block effect and optional grid. | | [Safe Area Guides](Shader-Safe-Area-Guides) | Broadcast safe-area guides and aspect mattes. | -| [Studio Color](Shader-Studio-Color) | Basic color controls and contract example. | +| [Singularity](Shader-Singularity) | Generative blackhole/accretion disk look. | +| [SMPTE Color Bars](Shader-SMPTE-Color-Bars) | Procedural SMPTE-style test pattern. | +| [Solid Color](Shader-Solid-Color) | Full-frame user-selected color. | | [Temporal Echo](Shader-Temporal-Echo) | Multi-frame echo trails with decay and tint. | | [Temporal Ghost Trail](Shader-Temporal-Ghost-Trail) | Soft trailing blend from recent frames. | | [Temporal Low FPS](Shader-Temporal-Low-FPS) | Deliberate choppy held-frame playback. | +| [Text Overlay](Shader-Text-Overlay) | Single-line live SDF text overlay. | +| [Trigger Ripple](Shader-Trigger-Ripple) | One-shot water-drop ripple trigger. | +| [UTC Clock](Shader-UTC-Clock) | Analog clock from host UTC/local time. | | [VHS](Shader-VHS) | Analog tape distortion, smear, bloom, noise, and fade. | | [Video Cube](Shader-Video-Cube) | Live video mapped onto a rotating cube. | | [Video Transform](Shader-Video-Transform) | Zoom, pan, rotate, and edge handling. | | [Waveform Overlay](Shader-Waveform-Overlay) | Lightweight luma waveform overlay. | +| [XYLA Exposure Chart](Shader-XYLA-Exposure-Chart) | Procedural stop-based exposure chart. | ## Typical Workflow @@ -45,4 +60,3 @@ This wiki is written for people using the system during setup, look building, re 5. Expand a layer to adjust parameters. 6. Save useful looks as stack presets. 7. Use OSC or REST only when you need external control or automation. - diff --git a/Making-Shaders.md b/Making-Shaders.md index cecf06d..baf35bc 100644 --- a/Making-Shaders.md +++ b/Making-Shaders.md @@ -1,14 +1,15 @@ # Making Shaders -Shader packages are small folders loaded from the shader library. A basic package looks like: +Shader packages are folders loaded from the shader library: ```text shaders/my-effect/ shader.json shader.slang + optional-texture-or-font-assets ``` -The runtime reads the manifest, generates a wrapper, includes your Slang code, compiles it to GLSL, and exposes the shader in the operator UI. +The runtime reads the manifest, generates a wrapper, includes your Slang code, compiles it to GLSL, and exposes the shader in the operator UI. Most shaders are single-pass. Advanced shaders can declare explicit render passes. ## Minimal Shader @@ -29,7 +30,8 @@ The runtime reads the manifest, generates a wrapper, includes your Slang code, c "default": 0.5, "min": 0.0, "max": 1.0, - "step": 0.01 + "step": 0.01, + "description": "Blend amount for the effect." } ] } @@ -46,7 +48,7 @@ float4 shadeVideo(ShaderContext context) } ``` -With `autoReload` enabled, edits should reload automatically. +With `autoReload` enabled, edits should reload automatically. You can also use `Reload shaders` in the UI. ## Manifest Fields @@ -58,12 +60,42 @@ With `autoReload` enabled, edits should reload automatically. | `description` | No | Short help text in shader listings. | | `category` | No | UI grouping label. | | `entryPoint` | No | Function to call. Defaults to `shadeVideo`. | +| `passes` | No | Advanced render-pass declarations. Omit for normal single-pass shaders. | | `textures` | No | Texture assets to bind as samplers. | +| `fonts` | No | Font assets used by text parameters. | | `temporal` | No | Previous-frame history request. | -Shader-visible identifiers must be valid Slang identifiers: letters, numbers, and underscores only, starting with a letter or underscore. This applies to `entryPoint`, parameter IDs, and texture IDs. +Parameter objects may include `description`; the UI shows it as short helper text. Shader-visible identifiers must be valid Slang identifiers: letters, numbers, and underscores only, starting with a letter or underscore. This applies to `entryPoint`, parameter IDs, texture IDs, font IDs, and pass IDs. -## Entry Point +## Render Passes + +Most packages omit `passes`; the runtime creates one implicit pass that calls `shadeVideo` and writes `layerOutput`. + +Use explicit passes for effects that need intermediate render targets, such as separable blur, matte refinement, or diagnostics: + +```json +{ + "passes": [ + { + "id": "mask", + "source": "shader.slang", + "entryPoint": "makeMask", + "output": "maskBuffer" + }, + { + "id": "final", + "source": "shader.slang", + "entryPoint": "finish", + "inputs": ["maskBuffer"], + "output": "layerOutput" + } + ] +} +``` + +`layerInput` means the input to this layer. `previousPass` means the previous pass output. Any earlier pass ID or output name can be used as an input. + +## Entry Point And Context Your shader implements the function named by `entryPoint`. @@ -76,9 +108,7 @@ float4 shadeVideo(ShaderContext context) Do not write your own fragment entry point. The runtime owns that. Your function returns the fully effected color, and the wrapper handles runtime mix and bypass behavior. -## Shader Context - -Your function receives: +The current `ShaderContext` includes: ```slang struct ShaderContext @@ -88,6 +118,9 @@ struct ShaderContext float2 inputResolution; float2 outputResolution; float time; + float utcTimeSeconds; + float utcOffsetSeconds; + float startupRandom; float frameCount; float mixAmount; float bypass; @@ -96,7 +129,9 @@ struct ShaderContext }; ``` -Use `uv` for normalized coordinates, `sourceColor` for the current layer input, `time` for animation, and `outputResolution` or `inputResolution` for pixel-sized effects. +Use `uv` for normalized coordinates, `sourceColor` for the current layer input, `time` for animation, `startupRandom` for stable per-launch variation, UTC fields for clock displays, and `outputResolution` or `inputResolution` for pixel-sized effects. + +The current pipeline uses display-referred Rec.709-like RGB for `sourceColor` and sampling helpers. Internal render targets are 16-bit floating point. ## Sampling Helpers @@ -110,7 +145,7 @@ float4 sampleTemporalHistory(int framesAgo, float2 uv); ## Parameters -Manifest parameters become global shader variables with matching IDs. +Manifest parameters become shader globals or runtime-provided helpers. | Manifest Type | Slang Type | JSON/API Value | | --- | --- | --- | @@ -119,6 +154,8 @@ Manifest parameters become global shader variables with matching IDs. | `color` | `float4` | `[r, g, b, a]` | | `bool` | `bool` | `true` or `false` | | `enum` | `int` | string in JSON, zero-based index in Slang | +| `text` | generated texture/helper | string | +| `trigger` | `int `, `float Time` | pulse/count | Float values are clamped to `min` and `max` when present. `vec2` needs exactly two numbers. `color` needs exactly four numbers. Enum defaults must match an option value. @@ -145,6 +182,53 @@ float4 logo = logoTexture.Sample(logoUv); For overlays or sprites, return useful alpha. `DVD Bounce` is a good texture-driven example. +## Fonts And Text + +Declare packaged font assets for text parameters: + +```json +{ + "fonts": [ + { "id": "roboto", "path": "fonts/Roboto-Regular.ttf" } + ], + "parameters": [ + { + "id": "titleText", + "label": "Text", + "type": "text", + "default": "VIDEO SHADER", + "font": "roboto", + "maxLength": 64 + } + ] +} +``` + +Text is rendered by the runtime into a single-line SDF mask texture. The wrapper exposes helpers based on the parameter ID, such as `sampleTitleText(textUv)` and `drawTitleText(textUv, color)`. + +Text is currently printable ASCII. `maxLength` defaults to `64` and is clamped to `1..256`. + +## Triggers + +`trigger` parameters appear as momentary buttons in the UI. Pressing one increments an integer uniform and records the host runtime time in `Time`. + +```json +{ + "id": "drop", + "label": "Drop", + "type": "trigger" +} +``` + +Shader-side: + +```slang +float age = context.time - dropTime; +float pulse = drop > 0 ? exp(-age * 4.0) : 0.0; +``` + +Triggers are useful for one-shot reactions such as flashes, ripples, cuts, or randomized looks. + ## Temporal Shaders Temporal shaders request previous frames: @@ -184,16 +268,18 @@ Useful files: | `active_shader.raw.frag` | Raw GLSL from `slangc`. | | `active_shader.frag` | Patched GLSL used by OpenGL. | -If compilation fails, start with `active_shader_wrapper.slang` and the UI compiler panel. +For multipass shaders, these files reflect the most recently compiled pass. If compilation fails, start with the UI compiler panel and the generated wrapper. ## Checklist - `shader.json` is valid JSON. - `id` is unique. -- `entryPoint`, parameter IDs, and texture IDs are valid shader identifiers. -- `shader.slang` implements the configured entry point. +- `entryPoint`, parameter IDs, texture IDs, font IDs, and pass IDs are valid shader identifiers. +- `shader.slang` implements the configured entry point or pass entry points. - Texture files exist. +- Font files exist. - Enum defaults are valid option values. - Temporal shaders handle empty or short history. +- Multipass packages write the final visible result to `layerOutput`, or make the final declared pass the visible output. - The shader compiles after reload. diff --git a/OSC-Control.md b/OSC-Control.md index 488c473..758792f 100644 --- a/OSC-Control.md +++ b/OSC-Control.md @@ -26,10 +26,11 @@ Examples: ```text /VideoShaderToys/layer-1/brightness -/VideoShaderToys/VHS/intensity /VideoShaderToys/vhs/wiggle /VideoShaderToys/fisheye-reproject/panDegrees /VideoShaderToys/video-transform/pan +/VideoShaderToys/text-overlay/titleText +/VideoShaderToys/trigger-ripple/drop ``` ## Layer Matching @@ -48,14 +49,7 @@ If multiple layers use the same shader ID or name, OSC controls the first matchi ## Parameter Matching -The parameter part can be: - -| Key Type | Example | -| --- | --- | -| Parameter ID | `panDegrees` | -| Parameter label | `Pan` | - -The UI shows a copyable OSC address beside each parameter, which is the easiest way to avoid typos. +The parameter part can be a parameter ID from `shader.json` or the parameter label shown in the UI. The UI's `OSC` button is the safest way to copy the exact address. ## Values @@ -77,9 +71,13 @@ Examples: /VideoShaderToys/fisheye-reproject/panDegrees 45.0 /VideoShaderToys/fisheye-reproject/fisheyeModel "equisolid" /VideoShaderToys/video-transform/pan 0.25 -0.5 -/VideoShaderToys/composition-guides/lineColor 1.0 0.8 0.1 1.0 +/VideoShaderToys/safe-area-guides/lineColor 1.0 0.8 0.1 1.0 +/VideoShaderToys/text-overlay/titleText "LIVE" +/VideoShaderToys/trigger-ripple/drop 1 ``` +For `trigger` parameters, the value is treated as a pulse. A simple integer or boolean message is enough. + Values are validated through the same parameter path as the REST API. Invalid addresses or values are ignored and reported to native debug output. ## Open Stage Control Examples diff --git a/Operator-Interface.md b/Operator-Interface.md index 0dbcca7..d1a24a4 100644 --- a/Operator-Interface.md +++ b/Operator-Interface.md @@ -10,16 +10,13 @@ If `serverPort` is changed in `config/runtime-host.json`, use that port instead. ## What You See -The top summary shows: +The top summary shows shader count, layer count, signal state, and current render time. The status area shows runtime state, video mode, output mode, render budget use, and compiler output. The compiler panel is the first place to look if a shader does not load. -| Field | Meaning | -| --- | --- | -| Shaders | Number of shader packages loaded from the shader library. | -| Layers | Number of active processing layers. | -| Signal | Whether the host currently sees video input. | -| Render | Current render time in milliseconds. | +## Shader Library -The status area shows runtime state, video mode, output mode, render budget use, and compiler output. The compiler panel is the first place to look if a shader does not load. +The shader library is searchable. It searches shader name, package ID, category, description, and error text. + +Unavailable packages can appear with an error label. They are shown for diagnostics, but cannot be added to the stack. `broken-shader-example` is intentionally invalid and exists to test this behavior. ## Layer Stack @@ -29,29 +26,31 @@ Common actions: | Action | How | | --- | --- | -| Add a layer | Choose a shader in the add layer picker and click `Add`. | +| Add a layer | Search the shader library and click the add button beside an available shader. | | Reorder layers | Drag a layer by its drag handle. | | Open controls | Click `Controls` or the layer title. | | Bypass a layer | Toggle `Bypass`. | | Remove a layer | Click the remove button. | -| Change a layer's shader | Expand the layer and choose a different shader. | -| Reset parameters | Expand the layer and click `Reset`. | +| Reset all parameters | Expand the layer and click the layer `Reset` button. | +| Reset one parameter | Use the reset button in that parameter row. | Changing order, bypass state, or shader assignment may reset temporal history. That is expected for temporal effects. ## Parameters -Shader parameters are generated from each shader's `shader.json` manifest. +Shader parameters are generated from each shader's `shader.json` manifest. Parameter rows may include short helper text from the manifest. | Parameter Type | UI Control | | --- | --- | | `float` | Slider plus numeric input. | | `vec2` | Two numeric inputs. | -| `color` | Color picker plus alpha value. | +| `color` | Swatch, color wheel, RGBA numeric inputs, and value slider. | | `bool` | Toggle. | | `enum` | Dropdown. | +| `text` | Text input. | +| `trigger` | Momentary trigger button. | -Each parameter shows a copyable OSC route such as: +Each row has an `OSC` button that copies the parameter's OSC route, such as: ```text /VideoShaderToys/vhs/wiggle @@ -77,19 +76,30 @@ runtime/runtime_state.json Autosave is for restoring the local machine after restart. Named presets are for looks you intentionally want to recall. -## Reload Shader +## Reload Shaders -The `Reload shader` button asks the runtime to reload and recompile shaders. Use it after changing a shader package when auto reload is off, or when you want to force a clean refresh. +The `Reload shaders` button rescans the shader library, re-reads manifests, queues shader compilation, and refreshes shader availability/errors. Use it after changing a shader package when auto reload is off, or when you want to force a clean refresh. + +If a changed shader fails, the previous working stack should keep running where possible while the error appears in the UI. + +## Screenshots + +The `Screenshot` button queues a PNG capture of the final output render target. Screenshots are written under: + +```text +runtime/screenshots/ +``` ## Reading Errors If the UI says `Compile Error`, open the compiler panel. Common causes are: - Invalid `shader.json`. -- A parameter, texture, or entry point name that is not a valid shader identifier. -- A missing texture file. +- A parameter, texture, font, pass, or entry point name that is not a valid shader identifier. +- A missing texture or font file. - Slang code that does not compile. - A shader that references a parameter not declared in the manifest. +- An intentionally broken diagnostics package. With auto reload enabled, fixing the file should cause the host to try again automatically. diff --git a/REST-API.md b/REST-API.md index 914ed98..d6f19d0 100644 --- a/REST-API.md +++ b/REST-API.md @@ -43,19 +43,13 @@ docs/openapi.yaml ## State -### Get Runtime State - ```http GET /api/state ``` -Returns the full runtime state: app config, runtime status, video status, DeckLink status, performance, available shaders, stack presets, and active layers. +Returns the full runtime state: app config, runtime status, video status, video I/O status, performance, available shaders, stack presets, and active layers. The older `decklink` status object may still be present for compatibility, but new clients should prefer `videoIO`. -Example: - -```powershell -curl http://127.0.0.1:8080/api/state -``` +Shader summaries include `available` and `error`, so a tool can show packages that exist but failed manifest or compile validation. ## WebSocket State Stream @@ -69,81 +63,17 @@ The server sends full runtime state JSON when a client connects and whenever sta ## Layer Endpoints -### Add Layer +| Endpoint | Body | Purpose | +| --- | --- | --- | +| `POST /api/layers/add` | `{ "shaderId": "vhs" }` | Add a layer using an available shader package. | +| `POST /api/layers/remove` | `{ "layerId": "layer-1" }` | Remove a layer. | +| `POST /api/layers/move` | `{ "layerId": "layer-1", "direction": -1 }` | Move up or down by signed direction. | +| `POST /api/layers/reorder` | `{ "layerId": "layer-1", "targetIndex": 0 }` | Move to an absolute stack index. | +| `POST /api/layers/set-bypass` | `{ "layerId": "layer-1", "bypass": true }` | Set bypass state. | +| `POST /api/layers/set-shader` | `{ "layerId": "layer-1", "shaderId": "video-transform" }` | Change a layer's shader. | +| `POST /api/layers/reset-parameters` | `{ "layerId": "layer-1" }` | Reset layer parameters to defaults. | -```http -POST /api/layers/add -``` - -Body: - -```json -{ "shaderId": "studio-color" } -``` - -### Remove Layer - -```http -POST /api/layers/remove -``` - -Body: - -```json -{ "layerId": "layer-1" } -``` - -### Move Layer By Direction - -```http -POST /api/layers/move -``` - -Body: - -```json -{ "layerId": "layer-1", "direction": -1 } -``` - -Negative moves up the stack. Positive moves down. - -### Reorder Layer To Index - -```http -POST /api/layers/reorder -``` - -Body: - -```json -{ "layerId": "layer-1", "targetIndex": 0 } -``` - -### Set Bypass - -```http -POST /api/layers/set-bypass -``` - -Body: - -```json -{ "layerId": "layer-1", "bypass": true } -``` - -### Change Shader - -```http -POST /api/layers/set-shader -``` - -Body: - -```json -{ "layerId": "layer-1", "shaderId": "vhs" } -``` - -### Update Parameter +## Update Parameter ```http POST /api/layers/update-parameter @@ -164,44 +94,15 @@ The `value` type depends on the shader parameter: | `color` | `[r, g, b, a]` | | `bool` | boolean | | `enum` | string option value | - -### Reset Parameters - -```http -POST /api/layers/reset-parameters -``` - -Body: - -```json -{ "layerId": "layer-1" } -``` +| `text` | string | +| `trigger` | number, usually incremented or pulsed | ## Stack Presets -### Save Preset - -```http -POST /api/stack-presets/save -``` - -Body: - -```json -{ "presetName": "live-show-look" } -``` - -### Load Preset - -```http -POST /api/stack-presets/load -``` - -Body: - -```json -{ "presetName": "live-show-look" } -``` +| Endpoint | Body | Purpose | +| --- | --- | --- | +| `POST /api/stack-presets/save` | `{ "presetName": "live-show-look" }` | Save current stack. | +| `POST /api/stack-presets/load` | `{ "presetName": "live-show-look" }` | Load a saved stack. | ## Runtime Actions @@ -217,5 +118,25 @@ Body: {} ``` -Successful mutating requests broadcast the updated state over `/ws`. +This rescans the shader library, re-reads manifests, queues shader compilation, and refreshes shader availability/errors. + +### Queue Screenshot + +```http +POST /api/screenshot +``` + +Body: + +```json +{} +``` + +This captures the next completed final output render target and writes a PNG under: + +```text +runtime/screenshots/ +``` + +Successful mutating requests broadcast the updated state over `/ws` when state changes. diff --git a/Runtime-Host-Configuration.md b/Runtime-Host-Configuration.md index bb50893..9973d73 100644 --- a/Runtime-Host-Configuration.md +++ b/Runtime-Host-Configuration.md @@ -30,10 +30,10 @@ The default configuration is: | `shaderLibrary` | Folder containing shader packages. Usually `shaders`. | | `serverPort` | Preferred local HTTP control server port. The browser UI, REST API, Swagger docs, and WebSocket use this server. | | `oscPort` | Local UDP port for OSC parameter control. Use `0` to disable OSC. | -| `inputVideoFormat` | DeckLink capture format, such as `1080p` or `720p`. | -| `inputFrameRate` | DeckLink capture frame rate, such as `59.94`, `50`, or `25`. | -| `outputVideoFormat` | DeckLink output/playout format. | -| `outputFrameRate` | DeckLink output/playout frame rate. | +| `inputVideoFormat` | Video capture format, such as `1080p` or `720p`. | +| `inputFrameRate` | Video capture frame rate, such as `59.94`, `50`, or `25`. | +| `outputVideoFormat` | Video output/playout format. | +| `outputFrameRate` | Video output/playout frame rate. | | `autoReload` | When true, shader manifests, shader source, and declared texture changes are reloaded automatically. | | `maxTemporalHistoryFrames` | Upper limit for temporal history buffers. Individual shaders can request fewer frames. | | `enableExternalKeying` | Requests external keying when the DeckLink device and keyer path support it. | @@ -55,7 +55,7 @@ Common examples include: 2160p / 59.94 ``` -Actual availability depends on the DeckLink card and signal path. +Actual availability depends on the active video I/O backend, installed card, driver, and signal path. The current production backend is DeckLink. ## Legacy Keys @@ -77,4 +77,4 @@ Those keys are still accepted. They apply to both input and output unless the ne - Set `oscPort` to `0` if you do not need OSC and want fewer moving parts. - Use matching input and output modes when possible for the simplest signal path. - If the UI cannot be reached on the expected port, check the runtime status for the actual bound port. - +- When external keying is enabled and supported, shader alpha can drive the key signal. diff --git a/Shader-3D-LUT-Apply.md b/Shader-3D-LUT-Apply.md new file mode 100644 index 0000000..fc651fc --- /dev/null +++ b/Shader-3D-LUT-Apply.md @@ -0,0 +1,26 @@ +# 3D LUT Apply + +| Field | Value | +| --- | --- | +| Shader ID | `lut-apply` | +| Category | Color | +| Package | `shaders/lut-apply/` | +| Texture | `test-lut.cube` as `lutTexture` | + +3D LUT Apply applies the packaged 33-point `.cube` LUT to incoming video using tetrahedral interpolation. It also includes pre/post controls and optional dithering. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| LUT Strength | `float` | 1 | Blend between source and LUT result. | +| Pre Exposure | `float` | 0 | Exposure adjustment before the LUT. | +| Post Contrast | `float` | 1 | Contrast after the LUT. | +| Dither Amount | `float` | 0.5 | Output dithering amount. | +| Clamp Input | `bool` | On | Clamps input before LUT lookup. | + +## Tips + +- Replace `test-lut.cube` with the intended LUT asset when building a show package. +- Use LUT Strength below 1 for a gentler grade. + diff --git a/Shader-Anamorphic-Desqueeze.md b/Shader-Anamorphic-Desqueeze.md new file mode 100644 index 0000000..0be088e --- /dev/null +++ b/Shader-Anamorphic-Desqueeze.md @@ -0,0 +1,24 @@ +# Anamorphic Desqueeze + +| Field | Value | +| --- | --- | +| Shader ID | `anamorphic-desqueeze` | +| Category | Transform | +| Package | `shaders/anamorphic-desqueeze/` | + +Anamorphic Desqueeze stretches squeezed footage back to its intended display aspect. It supports common anamorphic factors and fit/fill framing. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Desqueeze | `enum` | 1.33x | Selects 1.3x, 1.33x, 1.5x, or 2x horizontal stretch. | +| Framing | `enum` | Fit | Fit preserves the whole image; Fill crops to remove borders. | +| Pan | `vec2` | `[0, 0]` | Reframes after desqueeze and fit/fill scaling. | +| Outside Color | `color` | Black | Fill color for samples outside the source frame. | + +## Tips + +- Start with the lens or adapter factor, then choose Fit for safety or Fill for a full-frame result. +- Use Pan after the factor/framing is correct. + diff --git a/Shader-Balatro-Swirl.md b/Shader-Balatro-Swirl.md new file mode 100644 index 0000000..83a95d9 --- /dev/null +++ b/Shader-Balatro-Swirl.md @@ -0,0 +1,33 @@ +# Balatro Swirl + +| Field | Value | +| --- | --- | +| Shader ID | `balatro-swirl` | +| Category | Generative | +| Package | `shaders/balatro-swirl/` | + +Balatro Swirl is an animated painterly generative background adapted from a Shadertoy reference. It can run as a full generated field or blend with incoming video. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Spin Rotation | `float` | -2 | Base rotation applied to the swirl field. | +| Spin Speed | `float` | 7 | Animation speed. | +| Spin Amount | `float` | 0.25 | Radial twisting strength. | +| Spin Ease | `float` | 1 | Changes how twist falls off from center. | +| Contrast | `float` | 3.5 | Separation between dark and bright areas. | +| Lighting | `float` | 0.4 | Highlight/shadow modulation. | +| Offset | `vec2` | `[0, 0]` | Moves the generated field. | +| Colour 1 | `color` | Warm red | Primary swirl color. | +| Colour 2 | `color` | Cool blue | Secondary swirl color. | +| Colour 3 | `color` | Dark base | Background/base color. | +| Rotate Field | `bool` | Off | Rotates the whole generated field over time. | +| Source Mix | `float` | 0 | Blends the generated field with incoming video. | + +## Tips + +- Keep Source Mix at 0 for a pure generated background. +- Raise Source Mix when using it as a stylizing layer over video. +- Reduce Spin Speed to make the look calmer for long-running screens. + diff --git a/Shader-Black-and-White.md b/Shader-Black-and-White.md index 2b553c5..283135d 100644 --- a/Shader-Black-and-White.md +++ b/Shader-Black-and-White.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `black-and-white` | -| Category | Built-in | +| Category | Color | | Package | `shaders/black-and-white/` | Black and White converts the incoming image to grayscale using Rec. 709-style luma weights. It preserves the source alpha. @@ -22,4 +22,3 @@ This shader has no user parameters. - Use layer bypass to compare color and monochrome quickly. - Put utility overlays such as safe guides after this layer if you want guide colors to stay visible. - diff --git a/Shader-Broken-Shader-Example.md b/Shader-Broken-Shader-Example.md new file mode 100644 index 0000000..b3f049b --- /dev/null +++ b/Shader-Broken-Shader-Example.md @@ -0,0 +1,24 @@ +# Broken Shader Example + +| Field | Value | +| --- | --- | +| Shader ID | `broken-shader-example` | +| Category | Diagnostics | +| Package | `shaders/broken-shader-example/` | + +Broken Shader Example is intentionally invalid. It exists to verify that bad shader packages appear as unavailable in the UI with error text, instead of blocking the whole app. + +## Controls + +The manifest intentionally declares an unsupported parameter type: + +| Control | Type | Purpose | +| --- | --- | --- | +| Bad Toggle | `boolean` | Diagnostic failure. The supported type would be `bool`. | + +## Use + +- Do not use this as a production shader. +- Keep it visible as a test package when validating shader error handling. +- If you copy it as a starter shader, fix the parameter type first. + diff --git a/Shader-Composition-Guides.md b/Shader-Composition-Guides.md index 4617559..a5b46df 100644 --- a/Shader-Composition-Guides.md +++ b/Shader-Composition-Guides.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `composition-guides` | -| Category | Utility | +| Category | Scopes & Guides | | Package | `shaders/composition-guides/` | Composition Guides overlays rule-of-thirds lines and an optional center crosshair over the current image. It is intended for camera lineup, framing, and quick operator checks. @@ -25,4 +25,3 @@ Composition Guides overlays rule-of-thirds lines and an optional center crosshai - Put this layer near the bottom of the stack if you want it visible over the final look. - Use a bright color for camera lineup, then bypass the layer for program output. - If the guide is too strong on bright content, lower Line Opacity before changing color. - diff --git a/Shader-DVD-Bounce.md b/Shader-DVD-Bounce.md index c5a7e09..98abc3a 100644 --- a/Shader-DVD-Bounce.md +++ b/Shader-DVD-Bounce.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `dvd-bounce` | -| Category | Built-in | +| Category | Generative | | Package | `shaders/dvd-bounce/` | | Texture | `DVD_Logo.png` as `dvdLogoTexture` | @@ -24,4 +24,3 @@ DVD Bounce draws a transparent bouncing DVD-style logo over the current stack. T - Put this layer near the bottom if it should sit on top of other effects. - Reduce Alpha for a watermark-style overlay. - Increase Edge Padding if the logo feels too close to frame edges. - diff --git a/Shader-Ether.md b/Shader-Ether.md new file mode 100644 index 0000000..03a2e71 --- /dev/null +++ b/Shader-Ether.md @@ -0,0 +1,29 @@ +# Ether + +| Field | Value | +| --- | --- | +| Shader ID | `ether` | +| Category | Generative | +| Package | `shaders/ether/` | + +Ether is a raymarched generative field with volumetric strands. It can be used as a background or blended into live video. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Speed | `float` | 1 | Animation speed; set to 0 to pause motion. | +| Depth | `float` | 2.5 | Raymarch depth through the volume. | +| Density | `float` | 0.7 | Density of strands. | +| Brightness | `float` | 1 | Overall generated brightness. | +| Contrast | `float` | 1 | Dark/bright separation. | +| Offset | `vec2` | `[0.9, 0.5]` | Moves the generated field. | +| Base Color | `color` | Teal | Low-energy color. | +| Energy Color | `color` | Pink | High-energy color. | +| Source Mix | `float` | 0 | Blends with incoming video. | + +## Tips + +- Raymarched looks can be heavier than simple filters; watch render budget. +- Use Source Mix for a more subtle live-video texture. + diff --git a/Shader-False-Color.md b/Shader-False-Color.md index 7b11b99..676d28e 100644 --- a/Shader-False-Color.md +++ b/Shader-False-Color.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `false-color` | -| Category | Utility | +| Category | Color | | Package | `shaders/false-color/` | False Color maps image luminance to exposure-assist colors. It is useful for camera setup, debugging luma ranges, and seeing how other shaders affect brightness. @@ -22,4 +22,3 @@ False Color maps image luminance to exposure-assist colors. It is useful for cam - Use full Blend for exposure checks. - Use partial Blend when checking a look without losing the underlying picture. - Adjust Lift and Gain only if you are intentionally inspecting a shifted range. - diff --git a/Shader-Fisheye-Equirectangular-Mirror.md b/Shader-Fisheye-Equirectangular-Mirror.md new file mode 100644 index 0000000..f53279c --- /dev/null +++ b/Shader-Fisheye-Equirectangular-Mirror.md @@ -0,0 +1,30 @@ +# Fisheye Equirectangular Mirror + +| Field | Value | +| --- | --- | +| Shader ID | `fisheye-equirectangular-mirror` | +| Category | Projection | +| Package | `shaders/fisheye-equirectangular-mirror/` | + +Fisheye Equirectangular Mirror unwraps a single width-filled 16:9 fisheye source into a 360x180 equirectangular map. The rear hemisphere is mirrored into the same fisheye source. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Lens FOV | `float` | 190 | Physical fisheye field of view. | +| Optical Center | `vec2` | `[0.5, 0.5]` | Fisheye center in normalized source coordinates. | +| Fisheye Radius | `vec2` | `[0.5, 0.8889]` | X/Y radius for cropped or squeezed sources. | +| Yaw | `float` | 0 | Horizontal rotation. | +| Pitch | `float` | 0 | Vertical rotation. | +| Roll | `float` | 0 | Roll around the viewing axis. | +| Fisheye Model | `enum` | Equidistant | Physical lens projection model. | +| Edge Fill | `float` | 0.06 | Extends edge samples to cover small missing areas. | +| Edge Blur | `float` | 0.018 | Softens edge fill. | +| Outside Color | `color` | Black | Fill outside valid projection. | + +## Tips + +- Calibrate center and radius before adjusting yaw, pitch, or roll. +- Edge Fill is for small source edge gaps, not for major misalignment. + diff --git a/Shader-Gaussian-Blur.md b/Shader-Gaussian-Blur.md index 890e177..6916860 100644 --- a/Shader-Gaussian-Blur.md +++ b/Shader-Gaussian-Blur.md @@ -3,10 +3,11 @@ | Field | Value | | --- | --- | | Shader ID | `gaussian-blur` | -| Category | Built-in | +| Category | Transform | | Package | `shaders/gaussian-blur/` | +| Passes | `horizontal`, `vertical` | -Gaussian Blur softens the current image by sampling neighboring pixels with a Gaussian-style weight. +Gaussian Blur softens the current image with a separable two-pass Gaussian-style blur. ## Controls @@ -22,4 +23,3 @@ Gaussian Blur softens the current image by sampling neighboring pixels with a Ga - Increase Samples for a smoother blur, but watch render time. - Lower Strength for a gentle diffusion layer. - Put blur before VHS, color, or overlay shaders when you want those later effects to stay crisp. - diff --git a/Shader-Greenscreen-Key.md b/Shader-Greenscreen-Key.md index c5754da..0e4baee 100644 --- a/Shader-Greenscreen-Key.md +++ b/Shader-Greenscreen-Key.md @@ -3,29 +3,41 @@ | Field | Value | | --- | --- | | Shader ID | `greenscreen-key` | -| Category | Built-in | +| Category | Keying | | Package | `shaders/greenscreen-key/` | +| Passes | `rawMatte`, `refinedMatte`, `final` | -Greenscreen Key removes a green screen background and outputs transparent alpha for compositing. The shader returns premultiplied-looking color by multiplying the keyed RGB by alpha. +Greenscreen Key is a production-style green/blue screen keyer with matte refinement, despill, edge treatment, crop controls, and debug views. It outputs premultiplied-looking color and alpha for compositing/keying. ## Controls | Control | Type | Default | What It Does | | --- | --- | --- | --- | | Screen Color | `color` | Green | Target key color. | -| Threshold | `float` | 0.24 | Distance from key color where pixels become foreground. | -| Softness | `float` | 0.12 | Feather around the key edge. | -| Edge Softness | `float` | 0.08 | Extra edge smoothing. | -| Erode/Dilate | `float` | 0.0 | Shrinks or expands the matte. | -| Despill | `float` | 0.45 | Reduces green contamination in foreground. | -| Edge Boost | `float` | 0.08 | Raises edge alpha. | -| Clip Black | `float` | 0.0 | Cuts low alpha values to black/transparent. | -| Clip White | `float` | 1.0 | Pushes high alpha values to full opacity. | +| Threshold | `float` | 0.24 | Base distance from key color. | +| Softness | `float` | 0.16 | Matte feather around the threshold. | +| Screen Balance | `float` | 0.5 | Balances key response around the selected screen color. | +| Screen Pre Blur | `float` | 1 | Blurs source before matte generation. | +| Erode/Dilate | `float` | 0 | Shrinks or expands the matte. | +| Matte Blur | `float` | 1.25 | Smooths the refined matte. | +| Matte Gamma | `float` | 1 | Shapes matte falloff. | +| Matte Contrast | `float` | 1 | Increases or reduces matte separation. | +| Black Cleanup | `float` | 0 | Cleans low-alpha areas. | +| White Cleanup | `float` | 0 | Cleans high-alpha areas. | +| Despill | `float` | 0.45 | Reduces screen-color contamination. | +| Despill Bias | `float` | 0 | Biases despill behavior. | +| Spill Tint | `color` | White | Tint used during spill correction. | +| Edge Recover | `float` | 0.18 | Restores edge detail/color. | +| Edge Color | `color` | White | Edge recovery tint. | +| Clip Black | `float` | 0 | Cuts low alpha values. | +| Clip White | `float` | 1 | Pushes high alpha values to full opacity. | +| Crop Left/Right/Top/Bottom | `float` | 0 | Crops unwanted screen edges before final output. | +| View Mode | `enum` | Composite | Composite and debug views for matte/key inspection. | ## Tips - Start with Screen Color, Threshold, and Softness. -- Use Erode/Dilate sparingly to clean edges. -- Increase Despill when skin, hair, or props pick up green. -- Use Clip Black and Clip White after the matte is roughly correct. +- Use View Mode to inspect matte problems before adjusting final composite controls. +- Use Erode/Dilate, Matte Blur, and cleanup controls after the basic key is close. +- Use crop controls to remove stands, edges, or off-screen junk without adding another layer. diff --git a/Shader-Happy-Accident.md b/Shader-Happy-Accident.md new file mode 100644 index 0000000..c3ab49a --- /dev/null +++ b/Shader-Happy-Accident.md @@ -0,0 +1,25 @@ +# Happy Accident + +| Field | Value | +| --- | --- | +| Shader ID | `happy-accident` | +| Category | Generative | +| Package | `shaders/happy-accident/` | + +Happy Accident is a raymarched generative line field adapted from a CC0 Shadertoy source. It can generate a standalone look or blend with video. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Speed | `float` | 1 | Animation speed. | +| Scale | `float` | 1 | Spatial scale of the line field. | +| Ray Steps | `float` | 77 | Raymarch quality/work amount. | +| Intensity | `float` | 1 | Generated brightness. | +| Source Mix | `float` | 0 | Blends with incoming video. | + +## Tips + +- Ray Steps is the main quality/performance control. +- Use Source Mix for an abstract overlay rather than a full replacement. + diff --git a/Shader-Lift-Gamma-Gain.md b/Shader-Lift-Gamma-Gain.md new file mode 100644 index 0000000..1e157a4 --- /dev/null +++ b/Shader-Lift-Gamma-Gain.md @@ -0,0 +1,25 @@ +# Lift Gamma Gain + +| Field | Value | +| --- | --- | +| Shader ID | `lift-gamma-gain` | +| Category | Color | +| Package | `shaders/lift-gamma-gain/` | + +Lift Gamma Gain provides basic grading controls for shadows, midtones, highlights, and overall RGB offset. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Lift | `color` | 0.5 gray | Shadow control. | +| Gamma | `color` | 0.5 gray | Midtone control. | +| Gain | `color` | 0.5 gray | Highlight control. | +| Offset | `color` | 0.5 gray | Overall RGB offset. | +| Strength | `float` | 1 | Mix strength for the grade. | + +## Tips + +- Small changes go a long way; use Strength for easy comparison. +- Keep alpha at 1 for color controls unless you have a specific reason to change it. + diff --git a/Shader-Multipass-Test.md b/Shader-Multipass-Test.md new file mode 100644 index 0000000..1e3550d --- /dev/null +++ b/Shader-Multipass-Test.md @@ -0,0 +1,23 @@ +# Multipass Test + +| Field | Value | +| --- | --- | +| Shader ID | `multipass-test` | +| Category | Utility | +| Package | `shaders/multipass-test/` | +| Passes | `mask`, `final` | + +Multipass Test is a diagnostic shader that generates a mask in pass one, then samples that named intermediate in pass two. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Intensity | `float` | 1 | Strength of the final effect. | +| Scale | `float` | 10 | Scale of the generated mask pattern. | + +## Tips + +- Use this to confirm that multipass render targets and named pass inputs are working. +- It is primarily a diagnostic/reference package, not a polished show look. + diff --git a/Shader-Pixelate.md b/Shader-Pixelate.md index fe11b18..d695675 100644 --- a/Shader-Pixelate.md +++ b/Shader-Pixelate.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `pixelate` | -| Category | Utility | +| Category | Transform | | Package | `shaders/pixelate/` | Pixelate samples the image at the center of virtual cells, creating a low-resolution block effect. It can also draw a grid between cells. @@ -21,4 +21,3 @@ Pixelate samples the image at the center of virtual cells, creating a low-resolu - Lower Pixel Count for larger blocks. - Match X/Y counts to the output aspect ratio to avoid stretched cells. - Use a partial Grid amount for a game-screen or LED-panel feel. - diff --git a/Shader-SMPTE-Color-Bars.md b/Shader-SMPTE-Color-Bars.md new file mode 100644 index 0000000..68bc226 --- /dev/null +++ b/Shader-SMPTE-Color-Bars.md @@ -0,0 +1,19 @@ +# SMPTE Color Bars + +| Field | Value | +| --- | --- | +| Shader ID | `smpte-color-bars` | +| Category | Calibration | +| Package | `shaders/smpte-color-bars/` | + +SMPTE Color Bars generates a procedural SMPTE RP 219-style 16:9 color bar test pattern. + +## Controls + +This shader has no user parameters. + +## Tips + +- Use it for signal path checks, monitor checks, and output verification. +- Put it in a one-layer stack when you want a clean generated test pattern. + diff --git a/Shader-Safe-Area-Guides.md b/Shader-Safe-Area-Guides.md index 997d0e8..80c3612 100644 --- a/Shader-Safe-Area-Guides.md +++ b/Shader-Safe-Area-Guides.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `safe-area-guides` | -| Category | Utility | +| Category | Scopes & Guides | | Package | `shaders/safe-area-guides/` | Safe Area Guides overlays broadcast action safe, title safe, optional center marks, and optional aspect-ratio mattes. @@ -26,4 +26,3 @@ Safe Area Guides overlays broadcast action safe, title safe, optional center mar - Use this during layout and rehearsal, then bypass for final output if guides should not be visible. - Put it near the bottom of the layer stack so it overlays the final image. - Use Matte Opacity instead of Line Opacity when adjusting aspect preview darkness. - diff --git a/Shader-Singularity.md b/Shader-Singularity.md new file mode 100644 index 0000000..16ae935 --- /dev/null +++ b/Shader-Singularity.md @@ -0,0 +1,29 @@ +# Singularity + +| Field | Value | +| --- | --- | +| Shader ID | `singularity` | +| Category | Generative | +| Package | `shaders/singularity/` | + +Singularity is a whirling blackhole and accretion disk generative look. It can replace the frame or blend with video. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Speed | `float` | 1 | Animation speed. | +| Scale | `float` | 0.7 | Size of the generated structure. | +| Strength | `float` | 1 | Overall effect strength. | +| Ring Radius | `float` | 0.7 | Radius of the disk/ring. | +| Tightness | `float` | 1.35 | Pull/twist concentration. | +| Brightness | `float` | 1 | Generated brightness. | +| Color Shift | `float` | 1 | Color variation amount. | +| Center | `vec2` | `[0, 0]` | Center offset. | +| Source Mix | `float` | 0 | Blends with incoming video. | + +## Tips + +- Reduce Speed for a calmer background. +- Use Source Mix when layering over live content. + diff --git a/Shader-Solid-Color.md b/Shader-Solid-Color.md new file mode 100644 index 0000000..fcf6632 --- /dev/null +++ b/Shader-Solid-Color.md @@ -0,0 +1,21 @@ +# Solid Color + +| Field | Value | +| --- | --- | +| Shader ID | `solid-color` | +| Category | Color | +| Package | `shaders/solid-color/` | + +Solid Color fills the frame with one user-selected color. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Fill Color | `color` | White | Full-frame RGBA color. | + +## Tips + +- Useful for key/fill signal checks, quick blanks, or color reference frames. +- Alpha can matter when external keying is active. + diff --git a/Shader-Studio-Color.md b/Shader-Studio-Color.md deleted file mode 100644 index 369fc30..0000000 --- a/Shader-Studio-Color.md +++ /dev/null @@ -1,34 +0,0 @@ -# Studio Color - -| Field | Value | -| --- | --- | -| Shader ID | `studio-color` | -| Category | Built-in | -| Package | `shaders/studio-color/` | - -Studio Color is a practical color utility and a clear example of the shader parameter contract. It demonstrates float, vector, color, boolean, and enum controls. - -## Controls - -| Control | Type | Default | What It Does | -| --- | --- | --- | --- | -| Brightness | `float` | 1.0 | Multiplies RGB brightness. | -| Offset | `vec2` | `[0, 0]` | Samples the image from an offset UV position. | -| Tint | `color` | White | Multiplies the full color by a tint. | -| Invert | `bool` | Off | Inverts RGB. | -| Mode | `enum` | Normal | Normal, Luma, or Posterize output. | - -## Modes - -| Mode | Result | -| --- | --- | -| Normal | Applies brightness, offset, tint, and optional invert. | -| Luma | Converts the result to grayscale. | -| Posterize | Quantizes the result into four brightness steps. | - -## Tips - -- Use it as a quick utility layer for brightness and tint. -- Use it as a reference when creating custom shaders because it exercises every supported parameter type. -- Offset is clamped to the frame, so it will not wrap. - diff --git a/Shader-Temporal-Ghost-Trail.md b/Shader-Temporal-Ghost-Trail.md index d2b38df..256aada 100644 --- a/Shader-Temporal-Ghost-Trail.md +++ b/Shader-Temporal-Ghost-Trail.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `temporal-ghost-trail` | -| Category | Built-in | +| Category | Temporal | | Package | `shaders/temporal-ghost-trail/` | | Temporal | `preLayerInput`, 12 requested frames | @@ -21,4 +21,3 @@ Temporal Ghost Trail blends recent pre-layer frames with the current frame for a - Increase Trail Mix for stronger ghosts. - Lower Current Mix when you want motion to dominate over the live frame. - Place before color or stylization layers if you want the trail treated as part of the image. - diff --git a/Shader-Temporal-Low-FPS.md b/Shader-Temporal-Low-FPS.md index cba3c18..de23a1e 100644 --- a/Shader-Temporal-Low-FPS.md +++ b/Shader-Temporal-Low-FPS.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `temporal-low-fps` | -| Category | Built-in | +| Category | Temporal | | Package | `shaders/temporal-low-fps/` | | Temporal | `preLayerInput`, 8 requested frames | @@ -21,4 +21,3 @@ Temporal Low FPS holds recent frames to create choppy, deliberately low-frame-ra - Use whole-number Hold Frames for the cleanest stepped motion. - Use partial Blend to add stutter without fully freezing motion. - This shader needs a few frames of history after reload before the held-frame look stabilizes. - diff --git a/Shader-Text-Overlay.md b/Shader-Text-Overlay.md new file mode 100644 index 0000000..eaac009 --- /dev/null +++ b/Shader-Text-Overlay.md @@ -0,0 +1,28 @@ +# Text Overlay + +| Field | Value | +| --- | --- | +| Shader ID | `text-overlay` | +| Category | Scopes & Guides | +| Package | `shaders/text-overlay/` | +| Font | `fonts/Roboto-Regular.ttf` as `roboto` | + +Text Overlay renders a single-line live text overlay using the runtime text SDF helper functions. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Text | `text` | `VIDEO SHADER` | Displayed string, up to the manifest max length. | +| Position | `vec2` | `[0.08, 0.12]` | Normalized placement in the frame. | +| Scale | `float` | 0.42 | Text size multiplier. | +| Fill | `color` | White | Main text fill. | +| Outline | `color` | Black, 0.8 alpha | Outline color and opacity. | +| Outline Width | `float` | 0.12 | SDF outline width. | +| Softness | `float` | 0.04 | Edge smoothing. | + +## Tips + +- Text is currently single-line and printable ASCII. +- Use the OSC or REST API to drive live text from another tool. + diff --git a/Shader-Trigger-Ripple.md b/Shader-Trigger-Ripple.md new file mode 100644 index 0000000..6c4da01 --- /dev/null +++ b/Shader-Trigger-Ripple.md @@ -0,0 +1,26 @@ +# Trigger Ripple + +| Field | Value | +| --- | --- | +| Shader ID | `trigger-ripple` | +| Category | Utility | +| Package | `shaders/trigger-ripple/` | + +Trigger Ripple creates a water-drop style ripple that expands across the video whenever the trigger is pressed. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Drop | `trigger` | n/a | Starts a new ripple. | +| Center | `vec2` | `[0.5, 0.5]` | Ripple origin. | +| Strength | `float` | 0.12 | UV distortion amount. | +| Duration | `float` | 0.3 | How long the ripple expands and fades. | +| Wave Width | `float` | 0.09 | Thickness of the traveling ring. | +| Damping | `float` | 0.25 | Fade rate as the ripple expands. | + +## Tips + +- Map `Drop` to OSC for external cueing. +- Use Center with an XY pad for touch-triggered positions. + diff --git a/Shader-UTC-Clock.md b/Shader-UTC-Clock.md new file mode 100644 index 0000000..ed75183 --- /dev/null +++ b/Shader-UTC-Clock.md @@ -0,0 +1,24 @@ +# UTC Clock + +| Field | Value | +| --- | --- | +| Shader ID | `utc-clock` | +| Category | Utility | +| Package | `shaders/utc-clock/` | + +UTC Clock draws an analog clock driven by the host PC clock. It uses UTC seconds plus the PC UTC offset exposed in `ShaderContext`. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Show Local Time | `bool` | On | Uses the PC UTC offset for local time; off shows pure UTC. | +| Clock Scale | `float` | 0.7 | Clock face size. | +| Face Color | `color` | Dark translucent | Clock face fill. | +| Accent Color | `color` | Blue | Seconds hand and glow accent. | + +## Tips + +- Use Show Local Time for operator-facing clocks. +- Disable it when a true UTC clock is required. + diff --git a/Shader-VHS.md b/Shader-VHS.md index d7bb4ee..ea3b0aa 100644 --- a/Shader-VHS.md +++ b/Shader-VHS.md @@ -3,10 +3,11 @@ | Field | Value | | --- | --- | | Shader ID | `vhs` | -| Category | Built-in | +| Category | Glitch | | Package | `shaders/vhs/` | +| Passes | `tapeSmear`, `final` | -VHS creates an analog tape look with horizontal wiggle, YIQ-style smear, chromatic aberration, halation, bloom, noise, fade, and vignette. +VHS creates an analog tape look with horizontal wiggle, YIQ-style smear, chromatic aberration, halation, bloom, noise, static, fade, and vignette. ## Controls @@ -22,6 +23,8 @@ VHS creates an analog tape look with horizontal wiggle, YIQ-style smear, chromat | Bloom | `float` | 0.18 | Soft bright-area bloom. | | Fade | `float` | 0.22 | Washed, aged image response. | | Noise | `float` | 0.055 | Animated chroma/luma noise amount. | +| Analog Static | `float` | 0.045 | Random bright static intensity. | +| Static Lines | `float` | 0.65 | Horizontal static line visibility. | | Noise Size | `float` | 1.0 | Grain chunk size. | ## Tips @@ -30,4 +33,3 @@ VHS creates an analog tape look with horizontal wiggle, YIQ-style smear, chromat - For harsher tape damage, increase Wiggle and Noise. - Blur Samples affects cost. Reduce it if render time is tight. - Put VHS late in the stack if you want it to degrade the whole finished look. - diff --git a/Shader-Video-Cube.md b/Shader-Video-Cube.md index 741735a..fec4f06 100644 --- a/Shader-Video-Cube.md +++ b/Shader-Video-Cube.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `video-cube` | -| Category | Built-in | +| Category | Transform | | Package | `shaders/video-cube/` | Video Cube raycasts a rotating cube in screen space and maps the live video onto its faces. Areas outside the cube show a dark background mixed with the source. @@ -15,11 +15,10 @@ Video Cube raycasts a rotating cube in screen space and maps the live video onto | Spin Speed | `float` | 1.0 | Cube rotation speed. | | Cube Scale | `float` | 0.85 | Cube size. | | Face Zoom | `float` | 1.0 | Scale of video mapped onto each face. | -| Background Mix | `float` | 0.15 | Amount of source video visible in the background. | +| Background Mix | `float` | 0 | Amount of source video visible in the background. | ## Tips - Lower Background Mix for a more isolated object. - Increase Face Zoom if the mapped video feels too wide on each face. - Keep Cube Scale below the maximum if you want the full object visible. - diff --git a/Shader-Video-Transform.md b/Shader-Video-Transform.md index a64d63d..9752382 100644 --- a/Shader-Video-Transform.md +++ b/Shader-Video-Transform.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `video-transform` | -| Category | Utility | +| Category | Transform | | Package | `shaders/video-transform/` | Video Transform zooms, pans, and rotates the image by remapping output pixels back into source UV space. @@ -32,4 +32,3 @@ Video Transform zooms, pans, and rotates the image by remapping output pixels ba - Use this before keying or overlays if you need to line up the source first. - Use Clamp or Mirror for rotations where black corners are unwanted. - Use OSC on `pan` for XY pad control. - diff --git a/Shader-Waveform-Overlay.md b/Shader-Waveform-Overlay.md index 8e588c3..966e90e 100644 --- a/Shader-Waveform-Overlay.md +++ b/Shader-Waveform-Overlay.md @@ -3,7 +3,7 @@ | Field | Value | | --- | --- | | Shader ID | `waveform-overlay` | -| Category | Utility | +| Category | Scopes & Guides | | Package | `shaders/waveform-overlay/` | | Textures | `0.png`, `25.png`, `50.png`, `75.png`, `100.png` | @@ -31,4 +31,3 @@ Waveform Overlay draws a lightweight luma waveform inside a movable overlay box. - Increase Waveform Samples for more detail, but keep an eye on render time. - Raise Noise Reduction if the trace looks too fuzzy. - Put this layer last when you want the waveform visible over the final output. - diff --git a/Shader-XYLA-Exposure-Chart.md b/Shader-XYLA-Exposure-Chart.md new file mode 100644 index 0000000..5f2ec7c --- /dev/null +++ b/Shader-XYLA-Exposure-Chart.md @@ -0,0 +1,32 @@ +# XYLA Exposure Chart + +| Field | Value | +| --- | --- | +| Shader ID | `xyla-exposure-chart` | +| Category | Calibration | +| Package | `shaders/xyla-exposure-chart/` | + +XYLA Exposure Chart generates a procedural grayscale exposure chart inspired by XYLA-style dynamic range charts, with each patch one stop brighter than the previous. + +## Controls + +| Control | Type | Default | What It Does | +| --- | --- | --- | --- | +| Patch Count | `float` | 15 | Number of exposure patches. | +| Base Level | `float` | 0.000061 | Brightness of the darkest patch before tone mapping. | +| Peak Level | `float` | 1 | Brightness limit for the brightest patch. | +| Display Gamma | `float` | 1 | Gamma value when Tone Curve is Display Gamma. | +| Tone Curve | `enum` | Rec.709 | Linear, Display Gamma, or Rec.709 output encoding. | +| Chart Scale | `float` | 0.86 | Overall chart size. | +| Gap Size | `float` | 0.18 | Spacing between patches. | +| Vertical | `bool` | Off | Stacks patches vertically. | +| Reverse Order | `bool` | Off | Reverses dark-to-bright order. | +| Background | `float` | 0 | Background brightness. | +| Border | `float` | 0.08 | Patch border brightness. | +| Source Mix | `float` | 0 | Blends the chart with incoming video. | + +## Tips + +- Use Rec.709 for normal display-referred checks. +- Use Linear when testing shader math or linear display paths. + diff --git a/Shaders.md b/Shaders.md index ebcd832..c642407 100644 --- a/Shaders.md +++ b/Shaders.md @@ -1,6 +1,6 @@ # Shader Library -Each included shader is a package under `shaders//` in the main `video-shader` repository. A package normally contains a `shader.json` manifest and a `shader.slang` source file. Some shaders also include texture assets. +Each included shader is a package under `shaders//` in the main `video-shader` repository. A package normally contains a `shader.json` manifest and a `shader.slang` source file. Some shaders also include texture assets, font assets, or explicit multipass declarations. The browser UI lists shaders by display name and category. Presets and automation use the shader package `id`. @@ -8,11 +8,16 @@ The browser UI lists shaders by display name and category. Presets and automatio | Category | Shaders | | --- | --- | -| Built-in | Black and White, DVD Bounce, Gaussian Blur, Greenscreen Key, Studio Color, Temporal Ghost Trail, Temporal Low FPS, VHS, Video Cube | -| Utility | Composition Guides, False Color, Pixelate, Safe Area Guides, Video Transform, Waveform Overlay | -| Glitch | Data Mosh | -| Projection | Fisheye Reproject | -| Temporal | Temporal Echo | +| Calibration | SMPTE Color Bars, XYLA Exposure Chart | +| Color | Black and White, False Color, Lift Gamma Gain, 3D LUT Apply, Solid Color | +| Diagnostics | Broken Shader Example | +| Generative | Balatro Swirl, DVD Bounce, Ether, Happy Accident, Singularity | +| Glitch | Data Mosh, VHS | +| Keying | Greenscreen Key | +| Projection | Fisheye Equirectangular Mirror, Fisheye Reproject | +| Scopes & Guides | Composition Guides, Safe Area Guides, Text Overlay, Waveform Overlay | +| Temporal | Temporal Echo, Temporal Ghost Trail, Temporal Low FPS | +| Transform | Anamorphic Desqueeze, Gaussian Blur, Pixelate, Video Cube, Video Transform | ## Temporal Shaders @@ -27,24 +32,53 @@ Temporal shaders use previous frames. They need history buffers, so they can cos The runtime may clamp these requests using `maxTemporalHistoryFrames` in `runtime-host.json`. +## Multipass Shaders + +These packages declare explicit render passes instead of relying on the default single-pass wrapper: + +| Shader | Passes | +| --- | --- | +| Gaussian Blur | `horizontal`, `vertical` | +| Greenscreen Key | `rawMatte`, `refinedMatte`, `final` | +| Multipass Test | `mask`, `final` | +| VHS | `tapeSmear`, `final` | + +## Unavailable Diagnostic Package + +`broken-shader-example` is intentionally invalid. It exists to prove that a bad shader package can appear in the selector with an error instead of preventing the app from launching. Do not use it as a production look. + ## Pages - [Black and White](Shader-Black-and-White) +- [Anamorphic Desqueeze](Shader-Anamorphic-Desqueeze) +- [Balatro Swirl](Shader-Balatro-Swirl) +- [Broken Shader Example](Shader-Broken-Shader-Example) - [Composition Guides](Shader-Composition-Guides) - [Data Mosh](Shader-Data-Mosh) - [DVD Bounce](Shader-DVD-Bounce) +- [Ether](Shader-Ether) - [False Color](Shader-False-Color) +- [Fisheye Equirectangular Mirror](Shader-Fisheye-Equirectangular-Mirror) - [Fisheye Reproject](Shader-Fisheye-Reproject) - [Gaussian Blur](Shader-Gaussian-Blur) - [Greenscreen Key](Shader-Greenscreen-Key) +- [Happy Accident](Shader-Happy-Accident) +- [Lift Gamma Gain](Shader-Lift-Gamma-Gain) +- [3D LUT Apply](Shader-3D-LUT-Apply) +- [Multipass Test](Shader-Multipass-Test) - [Pixelate](Shader-Pixelate) - [Safe Area Guides](Shader-Safe-Area-Guides) -- [Studio Color](Shader-Studio-Color) +- [Singularity](Shader-Singularity) +- [SMPTE Color Bars](Shader-SMPTE-Color-Bars) +- [Solid Color](Shader-Solid-Color) - [Temporal Echo](Shader-Temporal-Echo) - [Temporal Ghost Trail](Shader-Temporal-Ghost-Trail) - [Temporal Low FPS](Shader-Temporal-Low-FPS) +- [Text Overlay](Shader-Text-Overlay) +- [Trigger Ripple](Shader-Trigger-Ripple) +- [UTC Clock](Shader-UTC-Clock) - [VHS](Shader-VHS) - [Video Cube](Shader-Video-Cube) - [Video Transform](Shader-Video-Transform) - [Waveform Overlay](Shader-Waveform-Overlay) - +- [XYLA Exposure Chart](Shader-XYLA-Exposure-Chart)