Rendering
Custom Filters
Define custom post-process filters and expose parsed arguments to the runtime through the filter registry.
Custom Filters
Custom filters extend the --filter grammar with your own names.
Registration
TypeScript
import { String3DCustomFilterRegistry } from 'string-tune-3d';
String3DCustomFilterRegistry.register({
name: 'heat',
implementations: {
webgl: {
kind: 'shader',
language: 'glsl',
stage: 'fragment',
code: 'void main() {}',
},
},
parse: (args) => ({ amount: Number.parseFloat(args) || 0 }),
});
Detailed Behavior
- Filter names are matched during
--filterparsing. parse()turns the CSS argument string into uniforms.- Backend-specific implementations are resolved through the engine runtime.