Real-Time Relief Shader Planner
Parallax Occlusion Mapping (POM) Height Ratio & Step Calculator
Tune Parallax Occlusion Mapping (POM) without stair-step slicing or runaway GPU frame times: compute physical height ratio from depth (cm) and tile width (m), estimate active raymarch steps at grazing angles, and copy HLSL parameters.
// Parallax Occlusion Mapping (POM) parameters const float heightRatio = 0.0300; // 3 cm over 1 m tile const float numLayers = lerp(32.0, 8.0, abs(dot(float3(0, 0, 1), viewDirTS))); const float layerDepth = 1.0 / numLayers; const float2 deltaUV = (viewDirTS.xy / max(viewDirTS.z, 0.15)) * heightRatio / numLayers;
Real-time POM height ratio & step count safety benchmarks
| Surface Type | Height Ratio | Min / Max Steps | GPU Cost Tier |
|---|---|---|---|
| Subtle brick / plaster | 0.015 – 0.030 | 8 / 20 steps | Low (Mobile / VR friendly) |
| Deep cobblestone / carved stone | 0.030 – 0.060 | 12 / 32 steps | Medium (PC / Console) |
| Extreme rock crevices | 0.060 – 0.100 | 16 / 48 steps | High (Prefer UE5 Nanite) |
Why height ratio must match physical tile scale
A 3 cm deep brick mortar joint over a 1-meter UV tile yields an exact physical height ratio of 0.03. Guessing arbitrary shader sliders like 0.15 stretches virtual mortar five times deeper than reality, causing heavy layer slicing and swimming UVs at oblique camera angles.
Adaptive step interpolation from head-on to grazing angles
Using lerp(maxSteps, minSteps, NdotV) keeps overhead views cheap (8 steps) while dedicating full 32-step precision only where camera rays slice steeply across height peaks.
Frequently asked questions
What causes visible horizontal slice lines in Parallax Occlusion Mapping?
Too few maxSteps for your heightRatio at grazing viewing angles. Either lower heightRatio below 0.06, raise maxSteps, or add linear/secant refinement at the end of the raymarch.
Does POM require a separate height map from my normal map?
Yes—POM raymarches a linear grayscale Height map (often packed into the Alpha channel of Albedo or Normal to save texture slots).
When should I use Unreal 5 Nanite Displacement instead of POM?
Use Nanite Displacement when silhouettes must actually bend on hero geometry; use POM on flat floors, walls, and lightweight WebGL/Unity scenes.
Can I generate synchronized Normal and Height maps for POM here?
Yes—open our 4-Map PBR Texture Generator to export matched Normal and Height maps locally.