The Compositor is Plinken’s GPU-accelerated layer system for building visual scenes. Composite cameras, images, video, text overlays, shaders, 3D scenes, and volumetric effects into a single output — for live streaming, video production, or offline rendering.
↓ compile (on scene change)
↓ render (per frame, wgpu)
Output → IOSurface / CVPixelBuffer
WHEP / RTMP / SRT / Recording
The compositor uses a DAG-based renderer (DagRenderer) that compiles layers into a GPU node graph. Changes to layers trigger recompilation; rendering executes the graph every frame.
Mode Description Live Real-time rendering with optional frame skipping Offline Full-quality render at arbitrary resolution
The canvas defines the output frame dimensions and frame rate.
Property Type Default Description Width u32 1920 Output width in pixels Height u32 1080 Output height in pixels Frame Rate f64 30.0 Output frames per second (24, 25, 29.97, 30)
-- Set canvas resolution and frame rate
pl . cmd ( " scene:set-canvas " , {
Layers are the building blocks of a composition. Each layer has a source , transform , opacity , blend mode , and visibility/lock state. Layers render in z-order (bottom to top).
Source Type Key Description Camera cameraLive webcam feed by device index Remote Camera remote_cameraiOS device camera via RTP RTMP Ingest rtmp_ingestExternal RTMP encoder (DJI, OBS) Image imageStatic image (PNG, JPG, WebP) Video videoVideo file with looping and position Color colorSolid RGBA color fill Text textStyled text with font, size, and color Caption captionTimeline-driven caption with karaoke highlighting Timeline Track timeline_trackVideo from a timeline video track Scene Capture scene_captureNested scene composition Participant participantWebRTC remote guest video Shader shaderISF shader effect with parameters Custom Shader custom_shaderUser-written ISF shader Browser browserWeb page (URL-based) Action actionTriggered overlay (action buttons 0–15) 3D Scene scene3dGLB model or panoramic image Gaussian Splat splat3D Gaussian Splat (.ply) Lights lightsStage lighting overlay SDF Shape sdfProcedural shape (circle, rect, polygon, star) Volume FX volume_fx3D volumetric effect (fire, smoke, fog) Particle Volume particle_volumeGPU particle system NDI ndiNDI® network video input Desktop Capture desktop_captureScreen capture Window Capture window_captureWindow capture
Mask Type Key Description Rectangle mask_rectSDF rectangle with corner radius and feather Ellipse mask_ellipseSDF ellipse with feather Gradient mask_gradientLinear gradient (start/end points) Bezier mask_bezierClosed bezier path (up to 16 control points)
Masks use grayscale as alpha: white = visible, black = hidden. Toggle Invert to flip.
Property Type Range Default Description xf32 0.0–1.0 0.0 Horizontal position (normalized) yf32 0.0–1.0 0.0 Vertical position (normalized) scale_xf32 0.0–10.0 1.0 Horizontal scale scale_yf32 0.0–10.0 1.0 Vertical scale rotationf32 -360–360 0.0 Rotation in degrees anchor_xf32 0.0–1.0 0.5 Pivot point X anchor_yf32 0.0–1.0 0.5 Pivot point Y content_zoomf32 0.1–10.0 1.0 Zoom inside the frame content_xf32 -1.0–1.0 0.0 Pan X inside the frame content_yf32 -1.0–1.0 0.0 Pan Y inside the frame
Property Type Default Description opacityf32 1.0 Layer opacity (0.0–1.0) corner_radiusf32 0.0 Rounded corners layer_featherf32 0.0 Edge feathering (soft edges) visiblebool true Whether the layer renders lockedbool false Prevents selection and editing is_groupbool false Folder layer — children render, source ignored is_maskbool false Use as grayscale mask for parent
Property Type Default Description glow_radiusf32 0.0 Outer glow radius glow_color[f32; 4] [1,1,1,0] Glow color (RGBA) outline_widthf32 0.0 Outline/stroke width outline_color[f32; 4] [1,1,1,0] Outline color (RGBA)
Property Type Default Description shadow_offset_xf32 0.0 Shadow X offset shadow_offset_yf32 0.0 Shadow Y offset shadow_blurf32 0.0 Shadow blur radius shadow_color[f32; 4] [0,0,0,0] Shadow color (RGBA)
Mode Description NormalStandard alpha blending AddAdditive (brightens) MultiplyMultiply (darkens) ScreenScreen (lightens) OverlayOverlay (contrast) AverageWeighted average of all inputs
Blend modes are implemented as wgpu fragment shaders supporting 2-way and 4-way blending.
The GPU pipeline provides node-based video processing:
Effect Description Brightness Adjust brightness (value multiplier) Contrast Adjust contrast Saturation Adjust color saturation Invert Invert colors Grayscale Convert to grayscale
Effects are composable — chain multiple effects in a VideoGraph:
-- Apply brightness and contrast via video grade
pl . cmd ( " scene:set-grade " , {
Command ID Description slot:addAdd a new layer slot:deleteRemove a layer slot:renameRename a layer slot:move-upMove layer forward (toward viewer) slot:move-downMove layer backward slot:reorderMove layer to specific z-position slot:toggle-visibleShow/hide layer slot:toggle-lockedLock/unlock layer slot:set-sourceChange layer source slot:set-transformUpdate transform properties slot:set-opacitySet layer opacity slot:set-blend-modeSet blend mode slot:set-automation-trackLink automation track slot:set-record-trackLink recording track slot:set-text-trackLink text track scene:set-canvasSet canvas resolution/fps scene:set-gradeSet video color grading
source = { type = " camera " , device_index = 0 }
source = { type = " image " , path = " /path/to/logo.png " }
-- Update layer transform
pl . cmd ( " slot:set-transform " , {
scale_x = 0.2 , scale_y = 0.2
pl . cmd ( " slot:set-blend-mode " , {
-- Toggle layer visibility
pl . cmd ( " slot:toggle-visible " , { index = 0 })
pl . cmd ( " slot:rename " , { index = 0 , name = " Hero Camera " })
3D Scene layers use an orbital camera with spherical coordinates.
Property Type Default Description Orbit Target (X/Y/Z) vec3 (0, 0.5, 0) Center of orbit Distance f32 3.5 Camera distance from target Azimuth f32 0° Horizontal orbit angle Elevation f32 15° Vertical orbit angle Focal Length f32 45° Field of view Focus Distance f32 0 Depth of field distance Look Target (X/Y/Z) vec3 (0, 0, 0) Independent look direction Follow Deadzone f32 0 Deadzone before tracking
Procedural shapes rendered via Signed Distance Fields:
Shape Index Description Circle 0 Perfect circle Rectangle 1 Rectangle Rounded Rect 2 Rectangle with corner radius Ring 3 Ring (hollow circle) Polygon 4 Regular n-gon (3–12 sides) Star 5 Star with alternating radii
All compositor properties can be automated via MIDI CC on a linked automation track.
CC Parameter 0 Position X 1 Position Y 2 Scale X 3 Scale Y 4 Rotation 5 Anchor X 6 Anchor Y 7 Content Zoom 8 Content X 9 Content Y 10 Opacity
CC Parameter 20 Mask X 21 Mask Y 22 Mask Width 23 Mask Height 24 Corner Radius 25 Feather 26 Radius X 27 Radius Y
CC Parameter 40 Orbit Target X 41 Orbit Target Y 42 Orbit Target Z 43 Distance 44 Azimuth 45 Elevation 46 Focal Length 47 Focus Distance 48 Look Target X 49 Look Target Y 50 Look Target Z 51 Follow Deadzone
The compositor supports multiple scenes. Each scene has its own layer stack, resolution, and frame rate. Switch between scenes for different camera angles, overlays, or visual themes.
pl . cmd ( " streaming:switch-scene " , { scene_id = 2 })
-- Go live (push preview to program)
pl . cmd ( " streaming:go-live " )