Post-Processing

Chromatic Aberration

Chromatic aberration simulates the RGB color fringing that occurs in camera lenses when different wavelengths of light focus at slightly different points. This creates colorful edges around high-contrast areas, adding a cinematic or glitchy quality.

Example Configuration

chromatic-aberration.json
{
  "effect": {
    "postProcesses": [
      {
        "id": "pp_chromatic",
        "type": "chromatic-aberration",
        "enabled": true,
        "settings": {
          "strength": 0.01,
          "angle": 0
        }
      }
    ]
  }
}

Settings

PropertyTypeRangeDefaultDescription
strengthnumber0-0.10.01Amount of RGB channel separation
anglenumber0-3600Direction of the color separation in degrees

How It Works

The chromatic aberration effect offsets the red, green, and blue color channels in different directions, creating the characteristic color fringing seen in imperfect optical systems.

  • Strength controls how much the channels are offset (small values are subtle, larger values are dramatic)
  • Angle determines the direction of the separation (0 = horizontal, 90 = vertical)

Suggested Presets

StyleSettings
Subtle Lensstrength: 0.005, angle: 0
Cinematicstrength: 0.01, angle: 45
Glitchstrength: 0.02, angle: 0
VHS Stylestrength: 0.03, angle: 90

API Usage

render-request.json
POST /api/v1/render
{
  "state": {
    "canvas": {
      "aspectRatio": "16:9",
      "backgroundColor": "#1a1a1a"
    },
    "layers": [...],
    "selectedLayerId": null,
    "effect": {
      "effectId": "ascii-standard",
      "enabled": true,
      "postProcesses": [
        {
          "id": "pp_1",
          "type": "chromatic-aberration",
          "enabled": true,
          "settings": {
            "strength": 0.015,
            "angle": 45
          }
        }
      ]
    }
  },
  "format": "png",
  "width": 1920,
  "height": 1080
}

Tips

  • Keep strength low (0.005-0.015) for realistic lens simulation
  • Higher strength (0.02-0.05) creates more dramatic, stylized effects
  • Combine with vignette for complete lens simulation
  • Works great with RGB glitch and noise effects
  • Most visible on high-contrast edges
  • Use 90° angle for a VHS/video artifact look