Added textures

This commit is contained in:
2026-05-02 19:46:48 +10:00
parent 8ce556330f
commit 4308e0b6f6
7 changed files with 318 additions and 75 deletions

View File

@@ -15,6 +15,7 @@ Each shader package lives under `shaders/<id>/` and includes:
- `category`
- `entryPoint`
- `parameters`
- optional `textures`
- optional `temporal`
Supported parameter types:
@@ -25,6 +26,25 @@ Supported parameter types:
- `bool`
- `enum`
## Texture assets
Shaders can optionally declare texture assets:
```json
{
"textures": [
{
"id": "logoTexture",
"path": "logo.png"
}
]
}
```
- `id` becomes a shader-visible sampler name
- `path` is resolved relative to the shader package directory
- texture asset changes trigger shader reload just like shader and manifest edits
## Temporal manifests
Shaders can optionally declare temporal history needs:
@@ -86,3 +106,9 @@ Helper function:
- `sampleVideo(float2 uv)` returns decoded full-resolution RGBA video from the live DeckLink input.
- `sampleSourceHistory(int framesAgo, float2 uv)` samples the most recent available source history frame, clamping to the oldest available frame if needed.
- `sampleTemporalHistory(int framesAgo, float2 uv)` samples the most recent available pre-layer history frame for temporal shaders, clamping to the oldest available frame if needed.
Declared texture assets are exposed as `Sampler2D<float4>` globals using the texture `id`, for example:
```slang
float4 logo = logoTexture.Sample(uv);
```