Spherize

Map content onto a 3D sphere surface with depth distortion

Props

  • radius

    Radius of the sphere (1 = half viewport height)

    Type
    number
    Default
    1
  • depth

    How much the sphere bulges toward viewer (0 = flat, higher = more bulge)

    Type
    number
    Default
    1
  • center

    The center point of the sphere

    Type
    {x: number, y: number}
    Default
    {"x":0.5,"y":0.5}
  • lightPosition

    Position of the specular light source

    Type
    {x: number, y: number}
    Default
    {"x":0.3,"y":0.3}
  • lightIntensity

    Intensity of the rim light (0 = off)

    Type
    number
    Default
    0.5
  • lightSoftness

    Softness of the rim light falloff (0 = hard edge, 1 = soft glow)

    Type
    number
    Default
    0.5
  • lightColor

    Color of the specular highlight

    Type
    string
    Default
    #ffffff

Usage

<Shader>
  <Spherize
    radius={1}
  >
    <Circle />
  </Spherize>
</Shader>