GPU compute filters for realtime video processing.
Runs compute shaders on GPU textures for effects like blur, sharpen, LUT color grading, beauty filter, denoise, etc.
All filters operate on GPU textures directly — no CPU roundtrip.
Example
# Apply gaussian blur
Dala.Media.Filter.apply(surface, :blur, %{radius: 5.0})
# Apply LUT color grading
Dala.Media.Filter.apply(surface, :lut, %{lut_path: "path/to/lut.png"})
# Chain multiple filters
Dala.Media.Filter.chain(surface, [
[:blur, %{radius: 2.0}],
[:sharpen, %{amount: 0.5}],
[:lut, %{lut_path: "film.emulation.png"}]
])
Summary
Functions
Apply a single filter to a GPU surface.
Chain multiple filters in sequence.
Get the shader source for a filter type.
Types
Functions
@spec apply_filter(surface() | nil, filter_type(), params()) :: binary() | :ok | {:error, term()}
Apply a single filter to a GPU surface.
@spec chain(surface(), [{filter_type(), params()}]) :: :ok | {:error, term()}
Chain multiple filters in sequence.
@spec shader_source(filter_type()) :: String.t()
Get the shader source for a filter type.