Skip to content

emboss ​

Lights the picture's brightness as a raised relief, from one side.

tsx
import { Clip, Composition, Track } from "@uberscene/kit";

// emboss: Lights the picture's brightness as a raised relief, from one side.
export default function Video() {
  return (
    <Composition fps={30} width={640} height={360}>
      <Track id="main">
        <Clip
          id="shot"
          src="asset:espresso"
          in={2}
          out={5}
          fit="cover"
          effects={[
            {
              type: "emboss",
              distance: 3,
              strength: [
                { at: 0.5, value: 0, easing: "easeInOut" },
                { at: 1.5, value: 6 },
              ],
            },
          ]}
        />
      </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.

paramtypedefaultdescription
anglenumber315Where the light comes from, in degrees clockwise from up: 315 is the top left.
strengthnumber (0..10)2How deep the relief looks, as a multiplier; 0 leaves the picture as it was (unless grey).
distancenumber (0.5..50)1.5How far apart the brightness is compared, in pixels: wider gives broader, softer edges.
greybooleanfalseShow the relief alone on mid-grey, as a stamped metal plate, instead of over the picture's colours.

All effects and transitions · Units

MIT licensed.