Ollin

Effects

This group covers the scene-wide realism passes over the 3D frame.

SketchWhat it shows
SceneDefocusDepth of field on a 3D scene, defocused by its own depth buffer. A row of orbs is drawn into a render target, then scene.combined(with: scene.depth, .defocus(...)) racks focus through them. Drag to rack focus by hand.
AmbientOcclusionScreen-space ambient occlusion from the scene's own depth and normals. It adds the soft darkening in crevices and contact gaps that grounds a brightly lit scene.
ScreenSpaceReflectionsSurfaces reflecting the scene around them. SSR is traced over the frame and shown on a ring of reflective spheres in different metal finishes.
RayTracedReflectionsMetals mirroring the actual scene, off-screen geometry included and with none of SSR's streaks. Rough surfaces spread their rays for a glossy result, and there is a reflectionBounces parameter. Needs a ray-tracing GPU and an environment.
ContactShadowsThe fine dark seam that seats an object on the surface it stands on.
AtmosphereFog as a cue for distance and height, and physical aerial perspective, both over one colonnade. Hold space to switch.
VolumesA column of smoke drawn from a box of density samples, rising past a ball whose shadow cuts a shaft down through it. The medium parameter turns it to cloud, fire, ink, or a glowing nebula.
MotionBlurThe streak a real camera's open shutter leaves on something moving.
TemporalAAEdges refined past MSAA by accumulating jittered frames.
SpecularAntialiasHighlights smaller than their pixel, held still instead of crawling.
UpscalingThe frame is rendered small and reconstructed at full size, which keeps the frame rate up.
FrameInterpolationThe sketch draws half as often, and a generated frame between each pair lets the display keep its rate.
LensFlareThe light a camera adds to a picture on its own.
PathTracedTune the scene live, then render the same frame offline with a path tracer.

Run one with swift run Example-3D-Effects-<Name>, for example swift run Example-3D-Effects-SceneDefocus.

↑↓ move ↩ open