Studio Yotsuba
Back to Node List

Drop Shadow

drop_shadow

Draws a directional hard shadow behind the image. Shadows outside the canvas are clipped; use Padding for extra space

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Image to cast a shadow from

Output Ports

NameTypeDescription
Image
output
Image
Image with shadow

Parameters

NameTypeDefaultRangeDescription / Options
Direction
direction
Enum
DownRight—

Direction to place the shadow

  • DownRightDownRight
    Shadow goes toward the lower-right
  • DownDown
    Shadow goes downward
  • DownLeftDownLeft
    Shadow goes toward the lower-left
  • RightRight
    Shadow goes to the right
  • LeftLeft
    Shadow goes to the left
  • UpRightUpRight
    Shadow goes toward the upper-right
  • UpUp
    Shadow goes upward
  • UpLeftUpLeft
    Shadow goes toward the upper-left
Distance
distance
Int
10–32

Approximate pixel distance to offset the shadow; diagonal vectors are normalized

Spread
spread
Int
00–16

Extra growth applied to the shadow silhouette

Spread Mode
spread_mode
Enum
Radial—

Controls whether spread expands in all directions or only toward the selected side

  • RadialRadial
    Spread in every direction around the shadow
  • DirectionalDirectional
    Spread only toward the selected shadow side
Shadow Color
color
Color
[0,0,0,0.6000000238418579]—

Shadow color, including alpha

Alpha Threshold
threshold
Float
0.50–1 / step 0.01

Pixels at or above this alpha cast a shadow; 0 means any alpha above zero

Padding
padding
Int
00–48

Extra transparent margin around the result; use at least offset plus spread to avoid clipping

Shadow Only
shadow_only
Bool
false—

Output only the shadow without the original image

Overview

Adds a directional hard shadow behind a sprite. Because the shadow is not blurred, it fits pixel art naturally and provides go-to effects such as raising a UI icon or placing a shadow to the lower right of a character with one node.

When to use it

  • Add a lower-right shadow to a pixel-art character or item
  • Offset by only 1px horizontally or vertically to resemble a one-sided edge shadow
  • Add a directional shadow instead of an Outline

Usage tips

  • Start with the defaults: lower right, distance 1, black at 60%. This is enough for a slight raised pixel-art look.
  • Adjust strength with the shadow color's alpha (0.6 by default). Alpha controls how naturally it sits over the background.
  • distance has approximately the same physical length in all eight directions. Diagonal components are normalized, then rounded to whole pixels.
  • This is an offset shadow, not an oval contact shadow. For a top-down contact shadow, placing shape_generate(Ellipse) underneath with blend is more appropriate.
  • shadow_only is also useful for extracting and managing the shadow as a separate layer.

Common pitfalls

  • The shadow is clipped: the output is the same size as the source. Set padding to at least the effective offset component plus spread. A nonfatal warning appears when the current padding is insufficient.
  • The shadow should be soft: this node intentionally uses hard edges for pixel art. For a soft shadow, apply gaussian_blur to the shadow_only output and composite it with blend.
  • The shadow extends to the opposite side: spread expands in every direction in the default Radial mode. Use spread_mode = Directional to limit it to the chosen side.

Notes

  • This is a hard-edged shadow, not a blurred shadow.
  • distance = 1 creates a look close to a one-sided edge shadow.
  • Increasing spread thickens the shadow mass.
  • spread_mode = Radial expands evenly around the shadow.
  • spread_mode = Directional expands only into the half-plane/quadrant of the selected direction, reducing overflow on the opposite side.
  • threshold = 0 excludes fully transparent pixels and selects every pixel with alpha above zero.
  • Diagonal direction vectors are normalized, so diagonal and cardinal movement have approximately the same physical length.
  • The output size matches the source, and shadows beyond the canvas edge are clipped.
  • Set padding only when the shadow needs extra room. It adds the specified amount of transparent padding on every side. Its maximum is 48, enough for cardinal distance 32 plus spread 16.
  • With shadow_only = true, you can inspect the shadow without the source image.
  • direction offers eight directions. Nine-slice and complex rim lighting are future extensions.

Examples

  1. Add a 1px shadow to the lower right of a character.
  2. Make a UI icon appear slightly raised.
  3. Increase spread to create a thick, solid shadow.
  4. Use shadow_only to keep the shadow on a separate layer.

Related nodes

  • glow — the luminous counterpart, using distance-based falloff
  • outline — a non-directional outline
  • contact_shadow_from_order — creates contact shadows from overlap order
  • surface_light_preview — full cast shadows for assets with height information
Back to Node List