Skip to main content

Dot Screen

Convert source-image luminance into a rotated monochrome dot pattern. dotScreen produces a graphic halftone treatment whose orientation, origin, and cell size remain fully adjustable.

GitHub

At a Glance

PropertyValue
ExportdotScreen
BackendsWebGPU and WebGL2
Render passesOne fullscreen color-filter pass
Additional inputsNone

Usage

import {ShaderPassRenderer} from '@luma.gl/engine';
import {dotScreen} from '@luma.gl/effects';

const renderer = new ShaderPassRenderer(device, {shaderPasses: [dotScreen]});

renderer.renderToScreen({
sourceTexture: sceneColorTexture,
uniforms: {dotScreen: {center: [0.5, 0.5], angle: 0.42, size: 5}}
});

Parameters

ParameterDefaultDescription
center[0.5, 0.5]Normalized origin of the rotated screen pattern.
angle1.1Dot-screen rotation in radians.
size3Dot-cell size in image pixels; minimum is 1.

Fine cells preserve more source detail, while larger cells make the underlying print structure more prominent.

Composition and Cost

The effect runs in one fullscreen pass and derives its pattern from current color and image coordinates. Raising Brightness and Contrast before the dot screen can sharpen tonal separation; Color Halftone preserves multiple color channels when a monochrome treatment is not desired.