Silhouette-Strip Depth-Parallax Octahedral Impostors
Refines 64-view octahedral impostors with vertex-merged 8-strip bit-packed silhouettes to cut transparent overdraw and per-fragment camera-ray depth parallax to eliminate ghosting across the three blended views.
Also known as GTA 6 octahedral impostors, silhouette-strip impostors, depth-parallax octahedral tree impostors, bit-packed silhouette strip impostors
In the family Performance, LOD & compression, impostors
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | No built-in octahedral impostor or silhouette-strip depth-parallax impostor baker. |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | |
| Unity | None found | No built-in silhouette-strip depth-parallax octahedral impostor baker or shader. |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Standard single-quad Octahedral impostors waste substantial fragment shader work on empty alpha pixels around irregular silhouettes such as trees and suffer double- or triple-image ghosting when barycentric weights blend three neighboring atlas views.
Tight silhouette strips: During the 64-view octahedral bake, each view's alpha silhouette is quantized into 8 horizontal strips whose 4-bit left and right bounds pack tightly into two uint32 words per view. At runtime, the vertex shader unpacks the strip bounds for the three active octahedral views and merges their union directly on an 8-strip mesh, collapsing empty quad corners and eliminating trunk seams between adjacent strips.
Per-fragment depth parallax: Instead of interpolating view vectors per vertex, every fragment casts the exact camera ray against each view's frame plane, reads baked depth dilated past the silhouette edge, and steps along the ray onto the reconstructed surface point. Because all three views reproject onto the same 3D surface position before blending, cross-view ghosting vanishes. Texture mip levels are chosen from the unshifted UVs so depth discontinuities never trigger coarse mip halos along foliage edges.
When to choose it
Reach for it when
- octahedral tree impostor ghosting between three blended views
- reduce alpha overdraw on distant billboard trees with silhouette strips
- gta 6 style octahedral impostors with depth parallax in threejs
- fix impostor trunk seams and coarse mip halos at depth edges
- pack 8 silhouette strip bounds into two uints in vertex shader
Choose it for dense open-world forests and irregular foliage silhouettes in WebGL2, WebGPU, or desktop engines where plain billboard quads cause heavy alpha overdraw and classic 3-view octahedral blending produces visible ghosting.
Prefer Octahedral impostors when rendering convex rocks or props whose quad fill ratio is already high and minimal vertex complexity matters most. Prefer Meshlets (cluster rendering) or Nanite virtualized geometry for mid-range trees that still need true silhouette deformation and close-up inspection. Pair with GPU-driven rendering to switch thousands of distant trees into instanced 8-strip draws.
Field marks
- Single-layer baked depth cannot represent deep multi-layered canopy self-occlusion at extreme grazing angles
- Undilated depth buffers leak background depth along silhouette edges unless depth dilation is applied during atlas baking
- Sampling mipmaps from depth-shifted UVs causes derivative spikes and blocky mip seams unless LOD is evaluated from unshifted UVs
- Tight 4-bit strip bounds must be merged conservatively across all three active views to prevent clipping branches mid-transition
Presets
Silhouette-Strip Octahedral Impostors — full alpha-quad overdraw & ghosting (left) vs 8-strip silhouette + depth parallax (right)
{
"P_PARALLAX": 0.8,
"P_OVERDRAW_VIS": 0.65,
"P_ORBIT": 0.55,
"P_SPLIT": 0.48
}Show GLSL (146 lines)
const float P_PARALLAX = 0.80; // P Ray Depth Parallax [0.0, 1.0, 0.05]
const float P_OVERDRAW_VIS = 0.65; // P Overdraw Mask Vis [0.0, 1.0, 0.05]
const float P_ORBIT = 0.55; // P Orbit Speed [0.0, 1.5, 0.05]
const float P_SPLIT = 0.48; // P Naive Quad / Strips [0.0, 1.0, 0.02]
vec2 rot2(vec2 p, float a) {
float c = cos(a);
float s = sin(a);
return vec2(c * p.x - s * p.y, s * p.x + c * p.y);
}
// Irregular botanical-tree crown + trunk SDF (high transparent alpha waste on a bounding quad!)
vec2 mapTree(vec3 p) {
// Trunk
vec2 tr = vec2(length(p.xz) - mix(0.085, 0.045, clamp((p.y + 0.48) * 1.4, 0.0, 1.0)), abs(p.y + 0.22) - 0.28);
float dTrunk = length(max(tr, 0.0)) + min(max(tr.x, tr.y), 0.0);
vec2 res = vec2(dTrunk, 1.0);
// Asymmetric multi-lobe canopy spheres
float d1 = length(p - vec3(0.0, 0.18, 0.0)) - 0.24;
float d2 = length(p - vec3(-0.22, 0.06, 0.08)) - 0.17;
float d3 = length(p - vec3(0.20, 0.10, -0.06)) - 0.18;
float d4 = length(p - vec3(0.04, 0.34, 0.05)) - 0.15;
float d5 = length(p - vec3(-0.10, 0.24, -0.14)) - 0.15;
float dCanopy = min(min(d1, d2), min(min(d3, d4), d5));
// Subtle foliage bump
dCanopy += 0.015 * sin(p.x * 26.0) * sin(p.y * 26.0) * sin(p.z * 26.0);
if (dCanopy < res.x) res = vec2(dCanopy, 2.0);
return res;
}
vec3 shadeTreeRay(vec3 ro, vec3 rd, out float hitA, out float hitD) {
hitA = 0.0;
hitD = 10.0;
float t = 0.1;
vec2 h = vec2(10.0, 0.0);
for (int i = 0; i < 48; i++) {
vec2 m = mapTree(ro + rd * t);
if (m.x < 0.003) { h = vec2(t, m.y); break; }
t += m.x * 0.85;
if (t > 4.5) break;
}
if (h.y < 0.5) return vec3(0.0);
hitA = 1.0;
hitD = h.x;
vec3 p = ro + rd * h.x;
vec2 e = vec2(0.004, 0.0);
vec3 n = normalize(vec3(
mapTree(p + e.xyy).x - mapTree(p - e.xyy).x,
mapTree(p + e.yxy).x - mapTree(p - e.yxy).x,
mapTree(p + e.yyx).x - mapTree(p - e.yyx).x
));
vec3 lDir = normalize(vec3(0.62, 0.78, 0.45));
float ndl = max(dot(n, lDir), 0.0);
vec3 alb = (h.y < 1.5) ? vec3(0.38, 0.24, 0.15) : mix(vec3(0.16, 0.48, 0.22), vec3(0.46, 0.78, 0.28), 0.5 + 0.5 * n.y);
return alb * (0.28 + 0.95 * ndl) + vec3(0.18, 0.30, 0.45) * (0.5 + 0.5 * n.y) * 0.35;
}
vec3 aces(vec3 x) {
x = max(x, 0.0);
return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float screenX = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
float parallax = clamp(P_PARALLAX, 0.0, 1.0);
float overVis = clamp(P_OVERDRAW_VIS, 0.0, 1.0);
float ang = iTime * max(P_ORBIT, 0.0) * 0.65;
// Orbiting camera around the impostor asset
vec3 ro = vec3(1.85 * sin(ang), 0.18, 1.85 * cos(ang));
vec3 fwd = normalize(-ro);
vec3 right = normalize(cross(fwd, vec3(0.0, 1.0, 0.0)));
vec3 up = cross(right, fwd);
vec3 rd = normalize(fwd * 1.48 + right * uv.x + up * uv.y);
vec3 bg = mix(vec3(0.06, 0.09, 0.15), vec3(0.18, 0.27, 0.42), smoothstep(-0.4, 0.5, uv.y));
vec3 col = bg;
// Bounding billboard quad region in screen space [-0.34, 0.34] x [-0.38, 0.38]
bool inQuad = (abs(uv.x) < 0.34 && abs(uv.y) < 0.38);
if (screenX < split) {
// Left: Naive single-quad octahedral impostor -- suffers wasted transparent overdraw across entire quad
// AND double/triple-view barycentric ghosting between adjacent octahedral atlas angles!
float a1, d1, a2, d2;
float snapAng = floor(ang * 4.0) / 4.0;
float nextAng = snapAng + 0.25;
float blendW = fract(ang * 4.0);
vec3 ro1 = vec3(1.85 * sin(snapAng), 0.18, 1.85 * cos(snapAng));
vec3 f1 = normalize(-ro1), r1 = normalize(cross(f1, vec3(0.0, 1.0, 0.0))), u1 = cross(r1, f1);
vec3 c1 = shadeTreeRay(ro1, normalize(f1 * 1.48 + r1 * uv.x + u1 * uv.y), a1, d1);
vec3 ro2 = vec3(1.85 * sin(nextAng), 0.18, 1.85 * cos(nextAng));
vec3 f2 = normalize(-ro2), r2 = normalize(cross(f2, vec3(0.0, 1.0, 0.0))), u2 = cross(r2, f2);
vec3 c2 = shadeTreeRay(ro2, normalize(f2 * 1.48 + r2 * uv.x + u2 * uv.y), a2, d2);
vec3 ghostCol = mix(c1, c2, blendW);
float ghostA = mix(a1, a2, blendW);
// Highlight wasted transparent quad pixels in crimson overdraw tint
if (inQuad) {
vec2 qEdge = abs(uv) - vec2(0.34, 0.38);
float border = smoothstep(0.012, 0.002, abs(max(qEdge.x, qEdge.y)));
col = mix(col, vec3(0.95, 0.22, 0.30), (1.0 - ghostA) * overVis * 0.32);
col = mix(col, vec3(1.0, 0.42, 0.48), border * overVis * 0.85);
}
col = mix(col, ghostCol, ghostA);
} else {
// Right: Tight 8-strip bit-packed silhouette mesh + per-fragment camera-ray depth parallax (zero ghosting!)
float aExact, dExact;
vec3 cExact = shadeTreeRay(ro, rd, aExact, dExact);
// Visualize the tight 8 horizontal bit-packed silhouette strips hugging the tree outline (cutting ~65% overdraw!)
if (inQuad) {
float stripIdx = floor((uv.y + 0.38) / 0.76 * 8.0);
float stripY = (stripIdx + 0.5) / 8.0 * 0.76 - 0.38;
// Tight per-strip half-width matching trunk vs canopy silhouette
float stripHalfW = (stripIdx < 2.5) ? 0.095 : (stripIdx < 6.5 ? 0.295 : 0.165);
bool inStrip = abs(uv.x) < stripHalfW;
float stripEdgeX = smoothstep(0.010, 0.002, abs(abs(uv.x) - stripHalfW));
float stripEdgeY = smoothstep(0.008, 0.002, abs(fract((uv.y + 0.38) / 0.76 * 8.0) - 0.5) * 0.095 - 0.044);
if (inStrip) {
col = mix(col, vec3(0.16, 0.88, 0.96), (1.0 - aExact) * overVis * 0.14);
col = mix(col, vec3(0.20, 0.96, 0.82), clamp(stripEdgeX + stripEdgeY, 0.0, 1.0) * overVis * 0.55);
}
}
// Depth-parallax blends smoothly into exact ray intersection (eliminates multi-view ghosting!)
float aSnap, dSnap;
float snapAng = floor(ang * 4.0) / 4.0;
vec3 ro1 = vec3(1.85 * sin(snapAng), 0.18, 1.85 * cos(snapAng));
vec3 f1 = normalize(-ro1), r1 = normalize(cross(f1, vec3(0.0, 1.0, 0.0))), u1 = cross(r1, f1);
vec3 cSnap = shadeTreeRay(ro1, normalize(f1 * 1.48 + r1 * uv.x + u1 * uv.y), aSnap, dSnap);
vec3 finalTree = mix(cSnap, cExact, parallax);
float finalA = mix(aSnap, aExact, parallax);
col = mix(col, finalTree, finalA);
}
float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
col = mix(col, vec3(0.95, 0.98, 1.0), sep);
fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| silhouette-strip-octahedral-impostors-live | Tesla T4 1920x1080 | 27.8× baseline (heavy) · 0.913 ms / 0.956 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| silhouette-strip-octahedral-impostors-live | NVIDIA L4 1920x1080 | 25.4× baseline (heavy) · 0.405 ms / 0.415 ms · 2.3× faster on L4 | opengl-timer-query · Cross-architecture validation |
| silhouette-strip-octahedral-impostors-live | NVIDIA A100-SXM4-40GB 1920x1080 | 18.6× baseline (moderate) · 0.536 ms / 0.545 ms · 1.7× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
Crosses
- GPU-driven rendering: GPU frustum and Hi-Z culling routes distant forest instances into indirect 8-strip impostor draws.
- Procedural foliage wind animation: Subtle vertex sway on the upper silhouette strips blends distant tree impostors seamlessly with nearby animated canopy meshes.
Sources
- primaryVlad Krutenyuk (2026). Octahedral Tree Impostors with Depth Parallax and Silhouette Strips. kvyverse.Verified via live page · 2026-11-30
- implementationVlad Krutenyuk (2026). Octahedral Tree Impostors Live Source (Three.js). kvyverse Editor.Verified via live page · 2026-11-30