Proposed improvement: new composable glitch-related filters toolset #162
KaliedaRik
started this conversation in
Ideas
Replies: 1 comment
|
My gut feeling is that this work, while interesting, offers no concrete benefits to the filters system, beyond niche usage. I'll leave the discussion open for now, but any work in this area is likely to be very low priority. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Overview
The existing
GLITCHfilter will be deprecated - though we can keep the existing filter under a new name eglegacy-glitch.Instead, Scrawl-canvas will provide a set of small, composable glitch primitives that can be mixed and matched to create modern “glitch” looks (VHS, scanline, streaming errors, codec corruption, etc.).
This approach:
What’s Already Possible (No New Filters Needed)
Channel Split / RGB Drift
Use:
OFFSET(per-channel dx/dy) + optionalGAUSSIAN_BLURNotes:
OFFSETalready supportsoffsetRedX/Y,offsetGreenX/Y,offsetBlueX/Y, etc.includeAlpha:falseto simulate chroma bleed.Quantize / Posterize / Banding
Use:
STEP_CHANNELS(bit-depth style stepping)LOCK_CHANNELS_TO_LEVELS(explicit level locking)REDUCE_PALETTE(palette quantization with optional dithering)Noise Overlays (Grain, RF Snow)
Use:
RANDOM_NOISEnoiseType: 'random' | 'ordered' | 'bluenoise'Color-Space “Oops” (Range Crush / Chroma Smear)
Use:
TINT_CHANNELS,MODULATE_CHANNELS, or OKLab filtersMODULATE_CHANNELS(amplify/clamp)Partially Covered (Workable via Chaining)
Row/Column Displace (Band “Tears”)
Current options:
GLITCHhas row shift logicDISPLACEwith a banded displacement map inlineMixRecommendation: add a clean, seedable
ROW_COL_DISPLACEprimitive for performance and ergonomics.Slice Repeat / Dropout
Current status: can fake dropouts via
THRESHOLD+COMPOSE.Missing: true “duplicate this slice” and “zero this span” operations.
Recommendation: implement a dedicated
SLICE_REPEAT_DROPOUTprimitive.Scanline Mod (Sinusoidal Luminance)
Current status: not achievable with current per-grayweight filters.
Recommendation: add a cheap per-row modulation primitive.
New Filters to Add
1)
ROW_COL_DISPLACEPurpose: Shift rows/columns in random bands (VHS/scanline effect).
Arguments:
direction: 'x' | 'y' | 'both'bands: { chance, heightMin, heightMax }offset: { xMin, xMax, yMin, yMax }edgeMode: 'wrap' | 'clamp' | 'transparent'seedImplementation notes:
Uint32Arraysubarray copies per band for speed; O(n)2)
SLICE_REPEAT_DROPOUTPurpose: Duplicate or zero random horizontal slices (streaming tear).
Arguments:
repeat: { chance, widthMin, widthMax, offsetMin, offsetMax }dropout: { chance, widthMin, widthMax }wrapMode: 'row' | 'image'seedImplementation notes:
setandfilloperations; O(n)3)
SCANLINE_MODPurpose: Apply per-row brightness modulation (sin wave or hum).
Arguments:
amp, freq, phase, bias = 0includeAlpha = falseImplementation notes:
All reactions