Octahedral impostors × AMD FidelityFX Super Resolution
Dithered impostor forests, temporally rebuilt. Huge forests drawn as octahedral impostors at low internal resolution and rebuilt by a temporal upscaler. Instead of cross-fading three baked views per pixel, each pixel picks one view stochastically and the upscaler's history does the blending.
Open in StudioReproduced88.1× · 2.73 ms
Verified proof

Split-screen WebGL2 proof comparing low-resolution single-frame octahedral tree impostors that snap between discrete atlas cells with coarse pixelated silhouettes (left) against stochastic per-pixel octahedral view selection with depth-parallax reconstruction and jittered temporal FSR accumulation (right).
Chromium Headless ANGLE/SwiftShader WebGL2 · 512x512 · replaces 3-view impostor cross-fading and low-res aliasing with 1-tap stochastic barycentric selection rebuilt cleanly by temporal upscaling
Show GLSL proof (202 lines)
const float P_OCTA_GRID = 6.0; // P Octahedral Atlas Grid [4.0, 12.0, 1.0]
const float P_UPSCALE_RATIO = 2.6; // P Internal Low-Res Factor [1.5, 4.0, 0.25]
const float P_ORBIT_SPEED = 0.75; // P Camera Orbit Speed [0.1, 1.8, 0.05]
const float P_PARALLAX = 0.65; // P Depth Parallax Strength [0.0, 1.2, 0.05]
float hash12(vec2 p) {
vec3 p3 = fract(vec3(p.xyx) * 0.1031);
p3 += dot(p3, p3.yzx + 33.33);
return fract((p3.x + p3.y) * p3.z);
}
// Interleaved gradient noise for blue-noise-like stochastic view selection
float ign(vec2 pix, float frame) {
vec2 p = pix + frame * vec2(5.588238, 11.17647);
return fract(52.9829189 * fract(dot(p, vec2(0.06711056, 0.00583715))));
}
// Hemi-octahedral direction encoding & decoding
vec2 dirToHemiOct(vec3 d) {
vec3 v = d / max(abs(d.x) + abs(d.y) + abs(d.z), 1e-4);
return vec2(v.x + v.z, v.x - v.z) * 0.5 + 0.5;
}
vec3 hemiOctToDir(vec2 e) {
vec2 t = e * 2.0 - 1.0;
vec3 v = vec3(0.5 * (t.x + t.y), 0.0, 0.5 * (t.x - t.y));
v.y = max(1.0 - abs(v.x) - abs(v.z), 0.02);
return normalize(v);
}
// Baked octahedral impostor texel evaluator for a multi-lobe conifer/broadleaf tree seen from bakedView
vec4 sampleBakedTree(vec2 localUV, vec3 bakedView, float seed, out vec3 outNormal, out float outDepth) {
// Rotate tree cluster in baked view space
vec3 fwd = normalize(bakedView);
vec3 right = normalize(cross(vec3(0.0, 1.0, 0.0), fwd + vec3(1e-4, 0.0, 0.0)));
vec3 up = cross(fwd, right);
// Trunk test
float trunk = smoothstep(0.055, 0.032, abs(localUV.x)) * smoothstep(-0.46, -0.42, localUV.y) * smoothstep(0.02, -0.05, localUV.y);
if (trunk > 0.5) {
outNormal = normalize(right * (localUV.x * 16.0) + fwd * 0.6);
outDepth = 0.0;
return vec4(vec3(0.24, 0.16, 0.11), 1.0);
}
// 6 volumetric foliage puffs projected into the baked octahedral frame
float bestZ = -9.0;
vec3 bestCol = vec3(0.0);
vec3 bestN = fwd;
float hitA = 0.0;
for (int k = 0; k < 6; k++) {
float fk = float(k);
float a = fk * 1.18 + seed * 6.2831;
float rOrb = (k == 0) ? 0.0 : (0.16 + 0.07 * fract(fk * 0.61 + seed));
vec3 c3 = vec3(cos(a) * rOrb, 0.04 + 0.07 * fk - 0.14, sin(a) * rOrb);
float rad = (k == 0) ? 0.24 : (0.18 - 0.012 * fk);
vec2 p2 = vec2(dot(c3, right), dot(c3, up));
float pz = dot(c3, fwd);
vec2 d2 = localUV - p2;
float ang = atan(d2.y, d2.x);
float jagged = 1.0 + 0.16 * sin(ang * 7.0 + fk * 2.3 + seed * 11.0) + 0.09 * cos(ang * 13.0 - fk);
float rEff = rad * jagged;
float dist = length(d2);
if (dist < rEff) {
float dz = sqrt(max(rEff * rEff - dist * dist, 0.0));
float zVal = pz + dz;
if (zVal > bestZ) {
bestZ = zVal;
vec3 ln = normalize(right * (d2.x / max(rEff, 1e-4)) + up * (d2.y / max(rEff, 1e-4)) + fwd * (dz / max(rEff, 1e-4)));
bestN = ln;
float tint = 0.72 + 0.42 * fract(seed * 3.7 + fk * 0.29);
vec3 leaf = mix(vec3(0.11, 0.27, 0.12), vec3(0.28, 0.42, 0.14), fract(seed + 0.18 * fk));
bestCol = leaf * tint;
hitA = 1.0;
}
}
}
outNormal = bestN;
outDepth = bestZ;
return vec4(bestCol, hitA);
}
// Render the forest of impostors for one camera sample (supports discrete snapped vs stochastic barycentric view)
vec3 renderForestSample(vec2 suv, vec2 pixCoord, float tFrame, float frameIdx, bool stochastic) {
float ang = tFrame * 0.42 * P_ORBIT_SPEED;
vec3 camDir = normalize(vec3(sin(ang) * 0.92, 0.34 + 0.08 * sin(tFrame * 0.5), cos(ang) * 0.92));
vec3 sunDir = normalize(vec3(0.62, 0.72, 0.32));
// Sky + distant rolling forest hills backdrop
vec3 sky = mix(vec3(0.56, 0.68, 0.80), vec3(0.18, 0.34, 0.56), clamp(suv.y * 1.4 + 0.2, 0.0, 1.0));
float hillLine = -0.06 + 0.06 * sin(suv.x * 5.2 + ang * 1.2) + 0.03 * cos(suv.x * 11.0);
vec3 col = sky;
if (suv.y < hillLine) {
float groundGrad = clamp((hillLine - suv.y) * 2.2, 0.0, 1.0);
col = mix(vec3(0.16, 0.25, 0.15), vec3(0.26, 0.32, 0.18), groundGrad);
}
// Evaluate 9 instanced octahedral impostor trees sorted back-to-front
for (int i = 0; i < 9; i++) {
float fi = float(i);
int row = i / 3;
int colIdx = i - row * 3;
float depthBand = float(row) * 0.34;
float tx = (float(colIdx) - 1.0) * 0.34 + (float(row) - 1.0) * 0.11 + sin(fi * 2.1) * 0.04;
float ty = -0.02 - float(row) * 0.13;
float scale = 0.24 + float(row) * 0.095;
vec2 qUV = (suv - vec2(tx, ty)) / scale;
if (abs(qUV.x) > 0.55 || abs(qUV.y) > 0.55) continue;
// Slight per-tree view direction parallax across screen
vec3 viewDir = normalize(camDir + vec3((tx - suv.x) * 0.35, 0.06 * float(row), 0.0));
vec2 octUV = dirToHemiOct(viewDir) * P_OCTA_GRID;
vec2 cell = floor(octUV);
vec2 f = fract(octUV);
// Compute triangle barycentric coordinates inside the octahedral cell
vec2 c0, c1, c2;
float w0, w1, w2;
if (f.x + f.y <= 1.0) {
c0 = cell; c1 = cell + vec2(1.0, 0.0); c2 = cell + vec2(0.0, 1.0);
w1 = f.x; w2 = f.y; w0 = 1.0 - w1 - w2;
} else {
c0 = cell + vec2(1.0, 1.0); c1 = cell + vec2(1.0, 0.0); c2 = cell + vec2(0.0, 1.0);
w1 = 1.0 - f.y; w2 = 1.0 - f.x; w0 = 1.0 - w1 - w2;
}
vec2 chosenCell;
if (!stochastic) {
// Left: snap to nearest octahedral cell only (visible view-popping + no smooth transition)
chosenCell = floor(octUV + 0.5);
} else {
// Right: 1-tap stochastic per-pixel octahedral view pick driven by blue-noise jitter
float r = ign(pixCoord + vec2(fi * 17.0, fi * 7.0), frameIdx);
if (r < w0) chosenCell = c0;
else if (r < w0 + w1) chosenCell = c1;
else chosenCell = c2;
}
vec3 bakedDir = hemiOctToDir(clamp(chosenCell / P_OCTA_GRID, vec2(0.02), vec2(0.98)));
// Depth-parallax UV correction between true viewDir and selected baked octahedral frame
vec2 parallaxUV = qUV;
if (stochastic) {
vec3 diffV = viewDir - bakedDir;
vec3 nTmp; float dTmp;
sampleBakedTree(qUV, bakedDir, fract(fi * 0.37 + 0.12), nTmp, dTmp);
parallaxUV -= vec2(diffV.x, diffV.y) * dTmp * 0.28 * P_PARALLAX;
}
vec3 tN; float tD;
vec4 smp = sampleBakedTree(parallaxUV, bakedDir, fract(fi * 0.37 + 0.12), tN, tD);
if (smp.a > 0.5) {
float ndl = max(dot(tN, sunDir), 0.0);
float sss = pow(clamp(dot(-viewDir, sunDir), 0.0, 1.0), 3.0) * 0.25;
vec3 lit = smp.rgb * (0.28 + 1.08 * ndl + sss);
float fog = clamp(0.28 - depthBand * 0.35, 0.0, 0.35);
col = mix(lit, sky * 0.92, fog);
}
}
return col;
}
vec3 acesTone(vec3 x) {
return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
bool useFSR = uv.x > 0.0;
vec2 suv = vec2(useFSR ? (uv.x - 0.25) : (uv.x + 0.25), uv.y);
suv.x *= 1.85;
vec3 col = vec3(0.0);
if (!useFSR) {
// Left: low internal resolution + discrete snapped octahedral impostors (pixelated + popping)
float pxStep = P_UPSCALE_RATIO;
vec2 lowCoord = floor(fragCoord / pxStep) * pxStep + 0.5 * pxStep;
vec2 lowUV = (lowCoord - 0.5 * iResolution.xy) / iResolution.y;
vec2 lowSUV = vec2((lowUV.x + 0.25) * 1.85, lowUV.y);
col = renderForestSample(lowSUV, floor(fragCoord / pxStep), iTime, 0.0, false);
} else {
// Right: FSR-style Halton sub-pixel jittered temporal accumulation over 6 stochastic 1-tap frames
vec3 accum = vec3(0.0);
float wSum = 0.0;
for (int f = 0; f < 6; f++) {
float ff = float(f);
// Halton (2, 3) sub-pixel jitter offset
float jx = fract(ff * 0.5 + 0.25) - 0.5;
float jy = fract(ff * 0.333333 + 0.166667) - 0.5;
vec2 jUV = suv + vec2(jx * 1.85, jy) * (P_UPSCALE_RATIO * 0.72 / max(iResolution.y, 1.0));
// Reprojected temporal history weight (exponential decay with reactive foliage sharpness)
float w = exp(-ff * 0.22);
vec3 sCol = renderForestSample(jUV, fragCoord, iTime - ff * 0.012, ff, true);
accum += sCol * w;
wSum += w;
}
col = accum / max(wSum, 1e-4);
}
col = acesTone(col * 1.12);
if (abs(uv.x) < 0.003) col = vec3(0.95, 0.93, 0.89);
fragColor = vec4(pow(clamp(col, 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Why they connect
Octahedral impostors writes albedo, normal and depth for each tree quad into the gbuffer, parallax-corrected from the baked atlas, so lighting treats it like geometry. AMD FidelityFX Super Resolution (the temporal versions) reads that gbuffer through its depth and motion-vector inputs along with jittered low-resolution colour, and reconstructs the display-resolution frame. The cross makes the gbuffer carry two things impostors usually lack: motion vectors computed from the reconstructed parallax position rather than the camera-facing quad, and a per-pixel frame choice drawn with jittered barycentric weights, which temporal accumulation averages into a smooth view blend.
How to build it
Unity or Godot 4 (both ship FSR) with a custom impostor shader, or Unreal with an impostor baker. Bake a hemi-octahedral atlas per species with albedo, normal and depth. At runtime, find the three nearest frames and their weights, then select one per pixel by comparing a blue-noise sample against the cumulative weights, advancing the noise with the upscaler's jitter index. Reconstruct world position from the selected frame's depth and write true motion vectors for it, so leaves do not smear. Mark alpha-tested foliage in FSR's reactive or transparency mask to limit ghosting. Keep near trees as meshes and cull instances on the GPU.
Field marks
- Fast camera rotation changes the selected frame faster than history accumulates, giving shimmer at silhouettes.
- Motion vectors taken from the camera-facing quad ghost the whole canopy.
- Thin twigs and alpha-tested leaves vanish at low internal resolution even with a reactive mask.
- Wind animation still needs a separate vertex or atlas animation path.
Prior art
No prior art found on 2026-11-29.
Searches run (4)
- arXiv: all:"octahedral impostors" AND all:"temporal upscaling" → 0 results
- GitHub repos: "octahedral impostors" "temporal upscaling" → 0 results
- arXiv: all:"impostors" AND all:"temporal anti-aliasing" AND all:"foliage" → 0 results
- GitHub repos: impostors "temporal anti-aliasing" foliage → 0 results