PixelSort

Pixels sort by brightness around the cursor and keep their sorted position, optionally decaying back over time

Props

  • radius

    Size of the cursor brush that sorts pixels

    Type
    number
    Default
    0.4
  • falloff

    Softness of the brush edge (0 = hard circle, 1 = very soft)

    Type
    number
    Default
    1
  • strength

    How fast pixels sort — runs more sorting passes per frame

    Type
    number
    Default
    0.1
  • decay

    How quickly sorted pixels melt back to their original position (0 = permanent)

    Type
    number
    Default
    0.1
  • axis

    Axis pixels are sorted along

    Type
    "horizontal" | "vertical"
    Default
    vertical
  • direction

    Sort order by brightness

    Type
    "ascending" | "descending"
    Default
    descending

Usage

<Shader>
  <PixelSort
    radius={0.4}
  >
    <Circle />
  </PixelSort>
</Shader>