Phaser AE

Ambient Occlusion

Free packv3.0.0-33DPost

Screen-space ambient occlusion: the contact darkening that grounds 3D objects in one another, so a box beside a wall has a seam and a torus has depth in its own hole. It is the cheapest thing that stops a scene reading as separate shapes floating in the same room.

This is a Free pack. Every phaser.io account can use it in their games.

Released October 14, 2026 · updated October 19, 2026

Ambient Occlusion: a screenshot of its demo
A note about these graphics

Expansion packs don't come with graphics. This screenshot is one way of drawing what the pack does, made for its demo: none of the sprites, tiles or backgrounds in it are in the pack.

That's by design. A pack is a game's logic, mechanics and effects, and it works with whatever art you give it. Some packs draw effects, backdrops or 3D scenes of their own, but none carries a game's sprites.

So the look is yours. Make the art on phaser.io, bring your own, or let your agent draw it in code: the same pack can look like anything.

What it does

After the meshes are drawn, it rebuilds view-space positions from the depth buffer, estimates occlusion at half resolution with sixteen taps on a spiral, softens the result with a blur, and multiplies it into the scene. When it is switched off the pass does not run, so it costs nothing.

The care is in what it avoids. Occlusion is measured along each surface's normal rather than by comparing depths, so a surface can never shade itself however grazing the view, and floors and walls do not stripe. The spiral is turned per pixel so it does not band across flat surfaces. Normals are taken from the closer neighbour on each axis, so a silhouette does not smear darkness off an object, and the blur is weighted by depth, so occlusion never bleeds across an edge into a halo.

Features

  • Contact darkening — creases, corners and the gaps between objects darken, from the depth buffer alone.
  • Half resolution — one pass of sixteen taps, then a depth-aware blur.
  • No banding or halos — normal-based measurement, per-pixel rotation and an edge-respecting blur.
  • Live controls — radius, strength, power and enabled on game.ssao.
  • Free when off — switched off, the pass does not run.

Good for

  • Interiors and furniture — rooms, offices and props that should sit on the floor and against the walls.
  • Modelling and building games — shapes and cut solids that need their own creases to read.
  • Close-up 3D scenes — tabletops and dioramas of objects near one another.
  • Any 3D scene with a quality setting — on for players whose GPU can spare a half-resolution pass, off for the rest.

Make it yours

Four options, set in the manifest or live on game.ssao: radius, the sample radius in world units (default 0.8); strength, how dark it goes (0 to 2, default 1); power, which tightens the darkening into the creases as it rises (default 1.5); and enabled. A furnished room can run a smaller radius and lighter strength for soft seams; a scene of chunky blocks can run the defaults or more for deep, obvious contact shadows; and a game can start it switched off and turn it on as a graphics option.

A quick look

{ "id": "ssao-3d", "options": { "radius": 0.9, "strength": 1.1 } }
game.ssao.power = 2;          // live: tighter into the creases
game.ssao.enabled = false;    // off; the pass no longer runs

Works with

  • render-3d — required; it supplies the depth and the camera. core-3d brings it.
  • blob-shadows-3d — blobs say an object touches the ground, occlusion says objects touch each other.

Good to know

  • It is screen-space, so an occluder off the edge of the screen or hidden behind another object counts for nothing, and the effect shifts a little as the camera moves.
  • It reads the opaque depth only, so water, particles and glass neither occlude nor are occluded.
  • It is a contact effect at about a metre of radius, not a stand-in for global illumination; a very large radius makes it noisy rather than softer.

More Post packs

Show all →