Skip to content

Why pixel grids matter ​

A single logical pixel may cover several display pixels, span a fractional distance, or be stretched differently along the two axes. A CRT treatment needs an appropriate scale for its scanline structure; an LCD treatment needs a scale and alignment for its cells. Applying either solely at the output pixel scale can produce a much finer pattern than the artwork suggests.

Beamline’s Pixel Grid control sets that treatment scale.

Three different resolutions ​

A game's resolution can refer to three different things:

DomainWhat it describesWhat it does not establish by itself
Source framebuffer or resourceThe dimensions of an actual GPU image used in renderingThat it contains the whole scene, or that its storage dimensions match the artwork's logical grid
Logical composition gridThe coordinate system in which artwork, camera placement or scene composition is organizedThat a texture with those dimensions ever exists
Presented latticeThe repeating pixel-scale structure visible in the final image, including its spacing and alignmentThe identity, dimensions or sampling rules of an upstream resource

A game can draw low-resolution artwork directly into a large framebuffer. Conversely, a small texture can be a bloom pass or minimap rather than the composition surface. Padding, filtering, cropping, UI and later passes can separate all three domains.

For a presented lattice, pitch is the distance between cells in presentation pixels. Phase is their offset: where those cells begin. In one axis, a useful coordinate model is:

text
logical coordinate = (presentation coordinate - phase) / pitch

A 5:3 picture on a 16:9 screen ​

A 400 by 240 composition stretched to 1920 by 1080 has X pitch 4.8 and Y pitch 4.5. A common square pitch implies different dimensions.A 400 by 240 composition stretched to 1920 by 1080 has X pitch 4.8 and Y pitch 4.5. A common square pitch implies different dimensions.

Suppose a game composes a 400×240 image and stretches it to fill 1920×1080. The resulting pitches would be:

text
X: 1920 / 400 = 4.8 presentation pixels per cell
Y: 1080 / 240 = 4.5 presentation pixels per cell

A single square-cell pitch gives the wrong dimensions. Using 4.8 on both axes suggests 400×225; using 4.5 suggests roughly 427×240. We need independent X/Y measurements to describe the original 400×240 stretch.

Real images can combine several mappings or lose recognizable spacing through filtering.

Gravity Circuit offers a concrete example. These captures show the same tutorial scene at 1920×1080 with Beamline's treatment off. Force Ratio uses an integer scale with bars around the picture. Best Fit fills the height while preserving its proportions. Stretch to Fit fills the screen by widening the picture.

Gravity Circuit tutorial in Force Ratio mode, with black bars on all four sides.
Force Ratio
1600×960 content; 4× on both axes
The same Gravity Circuit tutorial in Best Fit mode, filling the height with narrow side bars.
Best Fit
1800×1080 content; 4.5× on both axes
The same Gravity Circuit tutorial in Stretch to Fit mode, widened to fill the screen without bars.
Stretch to Fit
1920×1080 content; 4.8× across, 4.5× down

Grid modes ​

The overlay guide explains Screen, Auto, Manual and Virtual. Auto uses a saved measurement of the displayed grid; Manual chooses treatment dimensions, while Virtual also resamples the image.