← All notes

Rendering

Eight quads, not one: what a GTA 6 tree impostor shows about overdraw

Sources are listed at the end; claims about GTA 6 come from one screenshot and are marked as such.

What went round

A post on X showed a wireframe of a palm tree from what the hashtags call a GTA 6 build, with the caption, in Russian, that the game "uses the impostor optimisation in a clever way: instead of one quad they use eight quads, to minimise alpha testing. First time I see this." Within a day it had a quarter of a million views, and Ben Golus had quote-posted it: "This feels a bit like the frustum culling gif from Horizon Zero Dawn, but it's also causing some game devs to be surprised. But the reasons are different. It looks really cool, and is on the surface a smart idea. But…" The rest of his thread is not reachable from here, so this note argues the "but" on its own.

The picture is the whole technical content, and it is worth describing exactly. A palm stands on a grid. Over it lies a stack of eight horizontal rectangles, each split by one diagonal into two triangles. The bottom two are narrow and hug the trunk. The next is a little wider where the lowest fronds begin. The middle three are the widest, spanning the crown. The top two narrow again where the crown rounds off. Every rectangle is flat and faces the viewer. Together they are a billboard of the tree cut into eight bands, each band only as wide as the tree is at that height.

A palm tree with its billboard drawn as eight stacked rectangles, narrow at the trunk and wide across the crown
The picture that went round: a palm's impostor as eight bands. Screenshot posted by Ilya Maksimovich on X; see the sources.

Nothing in the picture says how the bands are textured, lit or faded, whether each band turns to face the camera on its own, or whether the count changes with distance. The replies asked those questions and got no answers. Everything below that goes past the picture is inference, and says so.

The waste a billboard carries

A billboard tree is a quad with a cut-out texture: where the texture's alpha is under the cut, the fragment is discarded. The quad is the tree's bounding box, and a tree does not fill its bounding box. A pull request that profiled vegetation for a bike computer's map measured the ratio for two species: a spruce's quad is about four times the area of its outline, a beech's about 1.4 times. A palm is worse than a spruce: a thin trunk under a crown that is wide but mostly air between fronds.

To put numbers on it, I drew a palm and a spruce as silhouettes and measured, per pixel, how much of each shape is air under one quad, under a convex hull, and under bands.

Six panels: a palm and a spruce silhouette each overlaid with one quad, a convex hull and eight bands, with the share of air and the fragment multiplier for each, and a table from 1 to 32 bands
Air under each shape. The palm's quad is 80 % air, nearly five fragments for every one that lands on a frond; the spruce's quad is 72 % air. Eight bands cut the spruce to ×1.78, better than its hull; on the round-crowned palm the hull edges the bands, ×3.54 against ×3.76, and it takes sixteen bands to beat it. Procedural silhouettes, measured at 512 px.

Every fragment in that wasted area still runs. The rasteriser cannot know which fragments will fail the alpha test, so the early depth rejection that saves opaque scenes is off for the draw: the shader must run to the discard. What the waste costs depends on what the shader does before it discards.

  • In a cheap forward pass, or in a depth-only prepass, the fragment does one texture fetch and a compare. Tens of thousands of such fragments are not a frame's problem.
  • In a deferred G-buffer pass the fragment may sample albedo, normal and material maps and write four or five targets before anything is known about its alpha, unless the shader is written to test alpha first. Then the waste is a full fragment, and a forest of palms at the horizon pays for air.
  • With alpha blending instead of a cut, every fragment is a read-modify-write of the target, discard or not. That is the particle case, and the oldest form of this problem.

So the gain from trimming a billboard is bounded by two numbers: how much of the quad is air, and how much a fragment of air costs. The first is geometry. The second is the renderer's business, and it is why reasonable people can look at the same picture and disagree about whether it matters.

Three columns showing what an air fragment does before it is discarded in a forward pass, behind a depth prepass, and in a deferred G-buffer pass, with a bar for the relative cost of each
What a fragment of air costs before the cut throws it away. The bar is the whole argument: the same air is nearly free behind a prepass and a full fragment of work in a G-buffer pass with nothing in front.

Trimming is old, bands are the twist

Cutting a sprite down to its opaque region is standard in 2D. Texture packers emit a polygon instead of a quad for each sprite; Unity's sprite importer has a "tight" mesh mode for the same reason; for three.js there is diet-sprite, which builds a tight mesh from a texture and an alpha threshold and notes that the fill-rate saving depends on how large the sprite is on screen. The reasoning has even been patented, hull and concave variants both.

For 3D impostors the same idea appears in three places worth reading.

Simplygon's billboard clouds read the opacity map and build geometry only around the opaque parts, so the impostor can be drawn opaque, with no alpha test at all. A complexity setting from 0 to 1 says how closely the geometry tracks the opacity map, "almost per pixel" near 1. The trade is explicit: more geometry for less overdraw. Their leaf example goes from 22 triangles to 608 for the tight impostor, 129 after reduction. No overdraw percentages are given, only pictures.

Tom Forsyth's chapter on impostors, the one that named the technique for a generation, is about something else: rendering the real object to a texture every few frames and showing the texture on a simple proxy until the view, the light or the animation has drifted past an error threshold. But two of its remarks are the heart of this discussion. The proxy should be a convex bounding object, because anything else fights the sorting. And impostors gave StarTopia "significant overdraw benefits for translucent objects such as trees, because an impostor only hits each pixel once." The overall speed-up he quotes is around a quarter, for complex scenes.

Octahedral impostors, Ryan Brucks's technique, bake a tree from many directions into one atlas, pick the three nearest views per frame and blend them. In the three.js forum thread about a forest of them, built with Andrea Gargaro's library, the question of overdraw comes up directly. Gargaro had sprite fitting in an older project, a convex hull with a chosen number of points around each sprite, and left it out of the library. Usnul answered that a per-sprite hull "doesn't help a lot" with octahedral blending, because any pixel of the quad may come from a different sprite, and that a convex hull over the union of all sprites gave him "about 30 % of pixels shaved off with just 5 vertices." That is the one measured number in all of this.

Against that background the GTA 6 picture is not a new idea but a particular, and sensible, choice of shape. The bands are not a convex hull, and the measurement above says which wins depends on the tree. On a conical spruce, whose width is a function of height and little else, eight bands beat the hull: ×1.78 against ×1.85. On a palm with a round crown the hull is slightly tighter, ×3.54 against ×3.76, because the bands keep the air in the corners of the crown's rectangle and the hull does not; sixteen bands overtake it. So why bands and not a hull? Because every band is still a rectangle: its UVs are a sub-range of the atlas, its mip chain is untouched, it faces the camera the way a single quad would, the band table is sixteen numbers per species that fall out of the atlas for free, and it costs eight quads' worth of vertices per tree, which on any modern GPU is nothing. A hull needs a polygon per species, per view if the atlas has several, and UVs that are no longer a rectangle. The bands are the engineer's trim, not the geometer's.

There is a second, speculative advantage. If each band faces the camera on its own, rather than the stack turning as one, the tree bends slightly in perspective the way a tall thin sprite should and a single flat quad does not. Nothing in the picture confirms this; the replies raised it as a guess.

The case against being impressed

This is where Golus's "but" probably lives, and the argument can be made without his thread.

The saving is bounded by the wasted fragments' cost, and good renderers already make that cost small. A depth prepass for the alpha-tested set, or an alpha-only prepass, means the air fragments run a one-fetch shader once and are depth-rejected in the main pass. In that setup the bands save a fraction of a cheap pass. GPUs also shade in 2 by 2 pixel quads, so eight thin bands have more edge pixels than one quad and give some of the saving back at the seams. Trimming does nothing for the real killer in a forest, which is trees behind trees: a thousand palms along a coast still overdraw each other band by band, and the fix for that is sorting, distance culling, or Forsyth's observation that one impostor per cluster hits each pixel once.

A heat map of a stand of palm impostors, one quad per tree on the left and eight bands per tree on the right, with fragment totals and mean overdraw under each
The same stand of palms as quads and as bands, coloured by how many impostor fragments land on each pixel. The bands remove about nine per cent of the fragments here; the heat, which is trees behind trees, stays. Trimming does not touch overdraw between trees.

Where it plainly pays: a deferred renderer with no cheap pass in front of the impostors, foliage that covers a large part of the frame at long range, and species shaped like palms. All three are true of a tropical city seen from a helicopter. It is a good choice for that game, and a small one for most others.

The frustum-culling GIF from Horizon Zero Dawn, which Golus mentions, was a moment when a routine technique looked like a revelation to people seeing it drawn. This picture seems to be the same kind of moment: the practice is old, the drawing is new, and the drawing made people think.

What Hard Road does, and what the bands would buy there

Hard Road's far trees are single cards, and the design went through exactly the problem above, so the comparison is concrete.

A forest road in Hard Road, trees on both sides, the truck in the foreground
The deep-woods spot in Hard Road, from the truck. Everything past the end of the straight is a card.
The same view with the far trees flat-coloured in cyan and magenta by species
The same frame with the cards flat-coloured by species, the debug view used to tune the swap line. The near trees are models; past the line, set at 300 m here, every tree is one quad.
GTA 6 palm, as shownHard Road far tree card
Geometry8 camera-facing horizontal bands, each a rectangle sized to the silhouette at its height1 quad per tree, cylindrical facing (turns about the vertical only; no top quads by the owner's rule)
Views bakedunknownone orthographic side view per species, captured at boot at 1024 px and halved to a 256 px atlas cell, 8 cells across
Alphacut, presumablycut at 0.5; the mip chain is built on the CPU with coverage-preserving alpha per level, so a distant tree keeps its silhouette density instead of thinning
Air fragmentsreduced by the trimthe full quad, but a depth-prepass twin (colour write off, same cut, same dither) runs first, so air costs one fetch in the prepass and is depth-rejected in the main pass
Swapunknownper tree by distance from the eye, in at 300 m, out at 380 m, with a dither over the band; the cards start where the 23 leafy species' models stop
LightingunknownLambert with the normal up, far shade, a snow coat by climate heavier toward the crown
Measurednothing publishedat the worst spot, deep woods at 1080p, all the cards together cost about 0.7 ms, and they give back about 1.2 ms of an 8 ms frame against the solid stubs they replaced

The two designs attack different costs. The bands attack the area of air. Hard Road attacks the price of air: with the prepass twin in front, an air fragment is one texture fetch, and the total card cost at the worst spot is under a millisecond. Trimming that quad would save a fraction of that fraction. The honest estimate is a few tenths of a millisecond at the deep-woods spot, and less elsewhere, against the risk of new seams in the flicker metric that took a week to settle.

If you want to try it anyway, it is a small change, because the atlas is already read back on the CPU for the mips.

  • At capture, for each species, split the 256 px cell into eight rows of 32 px and record the leftmost and rightmost opaque texel per row, with a two-texel margin for the bilinear taps. That is 16 numbers per species, written next to the existing cell record.
  • The card geometry becomes eight unit quads stacked, with a band index attribute. The position node reads the band's left and right from a small uniform table by species and band, and the UVs follow, so the atlas and its mips are untouched.
  • The prepass twin inherits the geometry. Nothing else changes: the dither, the swap, the coverage mips, the snow coat all key off world position and the atlas, not the quad.
  • Measure with the existing flicker metric and the deep-woods GPU timing before judging. If the gain is under 0.2 ms, revert and keep the note.

The stronger lever in Hard Road remains the one it already uses: swap distance. Moving the line from 512 to 300 m gave back more than any trim could.

ONC: whether impostors fit at all

ONC is a different problem, and the question is not "how" but "which kind, and is it worth it."

Inside a cylindrical habitat: a city on the near ground, the land curving up both sides and over, the sun spine down the middle
ONC from 150 m over the city core, looking down the band. Everything in the upper half of the frame is two to four kilometres away and seen from above or from the side, which is the problem with any baked impostor here.

The constraints come first, because they rule out the obvious answer. The hull is a cylinder of radius 1,920 m and length 28,800 m, with the city on a band of it. Standing in the city, the far side of the land is 3.8 km overhead and its buildings are seen roof-first, the ends are up to 14 km along the axis, and everything between is seen at every angle from below to above. The project's rules are that nothing that makes up a structure vanishes with distance (far things are drawn plainly, never left out), that windows use the same shader near and far so nothing changes at a swap, and that what is far keeps its lamps and their light. The numbers at the spawn, at build 138, are 6.9 million triangles, about 1,070 draw calls and 17 ms a frame, which is the 60 Hz cap, so the GPU headroom is unknown until measured.

Baked octahedral impostors are the wrong tool here. A hemisphere bake assumes the viewer is never above the object; on a cylinder the viewer is above most of the city most of the time. A full-sphere bake works but spends half its atlas on views nobody sees, and its three-view blend produces exactly the "same shader near and far" violation the rules forbid: a blended card with a baked lamp glow is not the window shader.

What fits ONC is Forsyth's original impostor, the dynamically re-rendered one, applied to cells of the hull rather than to objects.

  • Unit: a hull cell, roughly 240 m along the arc by 240 m along the axis, which is already how levels.js groups near and far forms. A cell far enough away (say beyond 1,500 m) is drawn as one textured quad lying in the cell's own tangent plane on the hull, not facing the camera: the hull curves away, so a quad on the hull is the right proxy and the parallax error stays small because the buildings are at most a few tens of metres tall against a cell 240 m wide.
  • Capture: the cell's real content, with its real materials and lights, rendered into the cell's texture by a camera placed where the player is, re-rendered when Forsyth's error estimate says so: view angle drift, distance change, the day clock moving the light. A player walking at 1.5 m/s changes the direction to a cell 2 km away by a few hundredths of a degree per second, so most cells could go hundreds of frames between refreshes. The impostor is the same shaders by construction, so the swap rule holds, lamps included, and nothing is left out.
  • Budget: refresh two to four cells a frame, round-robin by error. At 256 px per cell texture, two hundred far cells are 50 MB; at 512 px, 200 MB, too much, and unnecessary because a 240 m cell 2 km away is about 170 px wide on a 1080p frame.
  • Where it breaks: the band of cells just inside the switch distance, where the parallax of a 40 m building against a flat quad becomes visible, and anything tall that crosses a cell edge: the maglev pylons, the endcap works, the sun tube. Those stay geometry, as the rule says.
The cylinder in section with near cells marked as geometry and far cells as single quads lying on the hull, with the budget and the reasons against a baked atlas
The cylinder in section. Near cells stay geometry; far cells become one quad each, lying on the hull and re-rendered from the real materials when the view has drifted.

Before any of that is built, one measurement decides whether it is worth building. Draw the frame at the spawn with every cell beyond 1,500 m hidden, and compare GPU time with the full frame, using the renderer's timestamp queries rather than the vsync-capped frame time. If the far half of the world costs under about 3 ms of GPU, cell impostors are a lot of machinery for little, and the next step in ONC should stay with the plain forms and the kits' three levels. If it costs 6 ms or more, cell impostors are the right design, and the four points above are the plan. That measurement is an afternoon's work with the existing flight tool and a visibility toggle, and I would run it before writing a line of impostor code.

Sources

Images: the first picture is a screenshot posted on X by Ilya Maksimovich, reproduced here for commentary with a link to the post below. The silhouette study, the overdraw heat map and the two diagrams are mine, drawn for this note. The Hard Road and ONC frames are from the games.

X Bluesky