sharpen
Sharpens the picture's edges and detail, by an unsharp mask.
tsx
import { Clip, Composition, Track } from "@uberscene/kit";
// sharpen: Sharpens the picture's edges and detail, by an unsharp mask.
export default function Video() {
return (
<Composition fps={30} width={640} height={360}>
<Track id="main">
<Clip
id="shot"
src="asset:redCup"
in={18}
out={21}
fit="cover"
effects={[
{
type: "sharpen",
radius: 2,
strength: [
{ at: 0.5, value: 0, easing: "easeInOut" },
{ at: 1.5, value: 2 },
],
},
]}
/>
</Track>
</Composition>
);
}The coffee footage is Pixabay videos 209419, 209424, 46989 and 251, under the Pixabay Content License. The maker of the machine in the red cup shot has nothing to do with this project.
Params
Drawn as a shader.
| param | type | default | description |
|---|---|---|---|
strength | number (0..10) | 1 | How much contrast the edges gain, as a multiplier of the detail added; 0 leaves the picture as it was. |
radius | number (0..200) | 2 | How wide the edges it sharpens are, in pixels: the standard deviation of the blur it compares with. |