ScintillatorSynth / Scintillator

A Video Synthesis Engine for SuperCollider
https://scintillatorsynth.org
56 stars 8 forks source link

RenderPasses and RenderTargets #164

Open lnihlen opened 4 years ago

lnihlen commented 4 years ago

An essential feature to add support for sampling filters that need to know the color of pixels outside of the one currently being rendered. Render passes can also have configuration like clear color, if a depth buffer should be enabled or not. Also support for "globals" like modelview matrix, to allow for an associated ScinCamera object. Or perhaps the RenderPass and the Camera are the same.

RenderPasses/Cameras have a many-to-one relationship with Render Targets, which are framebuffers. The root Render Target is the output framebuffer but the server should be able to make others upon request. The Compositor keeps them in a tree relationship and can combine them together in configurable ways. Using framebuffers allows for async updates, meaning that they can each have their own update rate.

This feature unlocks 3D rendering (by enabling the depth buffer and camera) as well as many effects like Blur. It may have some intersection on work with video decode (the idea of an ImageBuffer that updates periodically) as well as the current render loop for fixed framerate rendering.