Files
video-shader-toys/shaders/feedback-highlight-accumulator/shader.json
Aiden 944773c248
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m25s
CI / Windows Release Package (push) Successful in 2m28s
added new layer input pass
2026-05-10 21:00:34 +10:00

81 lines
2.2 KiB
JSON

{
"id": "feedback-highlight-accumulator",
"name": "Feedback Highlight Accumulator",
"description": "Demonstrates shader-local feedback by storing a rolling 4-frame per-pixel highlight history in RGBA and displaying only the newest 3 frames. The highlight selection is an approximation based on a luminance threshold rather than an exact percentile reduction.",
"category": "Feedback",
"entryPoint": "buildHistory",
"passes": [
{
"id": "history",
"source": "shader.slang",
"entryPoint": "buildHistory",
"output": "historyBuffer"
},
{
"id": "display",
"source": "shader.slang",
"entryPoint": "displayHistory",
"inputs": [
"historyBuffer"
],
"output": "layerOutput"
}
],
"feedback": {
"enabled": true,
"writePass": "history"
},
"parameters": [
{
"id": "highlightThreshold",
"label": "Highlight Threshold",
"type": "float",
"default": 0.92,
"min": 0.5,
"max": 1.5,
"step": 0.001,
"description": "Approximate cutoff for the brightest parts of the frame."
},
{
"id": "softness",
"label": "Threshold Softness",
"type": "float",
"default": 0.05,
"min": 0.001,
"max": 0.25,
"step": 0.001,
"description": "Softens the threshold so near-highlights can contribute gradually."
},
{
"id": "accumulateAmount",
"label": "Contribution Amount",
"type": "float",
"default": 0.6,
"min": 0.0,
"max": 2.0,
"step": 0.001,
"description": "Strength of each frame's highlight contribution before it is shifted into the rolling history."
},
{
"id": "displayGain",
"label": "Display Gain",
"type": "float",
"default": 2.5,
"min": 0.0,
"max": 8.0,
"step": 0.01,
"description": "Brightness applied to the sum of the most recent three stored highlight samples."
},
{
"id": "baseMix",
"label": "Base Mix",
"type": "float",
"default": 0.25,
"min": 0.0,
"max": 1.0,
"step": 0.01,
"description": "Amount of the live source image kept under the recent highlight history display."
}
]
}