Shadow Acne Eliminated
Every ray tracer fights shadow acne and self-intersection artifacts. The cause? Floating-point error. The solution? Exact arithmetic.
The Problem
Why Shadow Acne Happens
- Ray hits a triangle surface
- Hit point computed using dot products, cross products, division
- Floating-point errors accumulate at EVERY step
- Computed hit point is NOT exactly on the surface
- Secondary ray re-intersects the SAME triangle (self-intersection)
- Result: random dark spots = shadow acne
Standard "Fix": Epsilon Offset
Push the hit point slightly off the surface by some epsilon value.
- • Too small? Still get acne
- • Too large? Light leaks, wrong shadows
- • Scene-dependent magic numbers
- • Never fully solved
VLA Solution: Exact Arithmetic
Hit point is computed EXACTLY on the surface.
- • No epsilon needed
- • No self-intersection possible
- • Mathematically correct
- • Works for ANY scene
| Metric | FP64 | VLA |
|---|---|---|
| Hit point error | ~1e-14 to 1e-10 | 0.0 (exact) |
| Self-intersections | Frequent | Impossible |
| Epsilon tuning | Required per scene | Not needed |
| Light leaks | Common artifact | Eliminated |
How It Works
# Standard ray-triangle intersection accumulates error t = dot(edge1, h) # Error 1 u = dot(s, h) / t # Error 2 + division v = dot(ray_dir, q) / t # Error 3 + division hit_point = origin + t*dir # Error 4 # VLA: Every operation is EXACT t = vla.dot(edge1, h) # Exact u = vla.div(vla.dot(s, h), t) # Exact v = vla.div(vla.dot(ray_dir, q), t) # Exact hit_point = vla.add(origin, vla.mul(t, dir)) # Exact # Result: hit_point is EXACTLY on the triangle plane
Path Tracing
Thousands of bounces per pixel. Each bounce accumulates error in FP64. VLA maintains exactness through unlimited bounces.
Watertight Meshes
Rays that should hit edges between triangles sometimes miss both. Exact arithmetic means true watertight intersection testing.
Applications
Film & VFX
Production renderers spend hours per frame. Eliminating shadow acne at the source means fewer retakes and cleaner compositing.
Architecture Visualization
Interior scenes with complex lighting. Light leaks through walls ruin the realism. Exact intersection means physically correct light transport.
Scientific Visualization
When the render IS the data, artifacts can be mistaken for features. Exact rendering means what you see is what the data actually shows.
Building a Renderer?
Let's discuss how exact arithmetic can eliminate your precision artifacts.
Request Discovery Call