Skip to content
ExtendedSource checked

Parallax Occlusion Mapping

Offsets texture coordinates by ray-marching through a height field on the surface.

Quick Facts

Compact metadata for implementation and discovery.

Category
Rendering
Difficulty
Advanced
Family
Surface Detail
Tier
Extended
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
3
Code example
Ready
Visualization
Ready

Overview

Parallax occlusion mapping simulates depth in a material by stepping along the view ray through a height map and using the hit point for texture lookup.

Core Concepts

height mapview raytexture-coordinate offsetself-occlusion

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(steps)

Average

O(pixels * steps)

Worst

O(pixels * steps)

Space

O(1)

When to Use

  • Use when real-time graphics needs height map.
  • Use when the input matches the assumptions behind surface Detail.

When Not to Use

  • Avoid when the effect costs more than the visual improvement for the target hardware.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Offsets texture coordinates by ray-marching through a height field on the surface
  • Uses height map and view ray to guide the work.
  • Produces rendered image.

Use Cases

  • Real-time graphics
  • Offline rendering
  • Lighting and visibility effects

Inputs

  • Scene geometry
  • Materials
  • Camera and lighting state

Outputs

  • Rendered image
  • Visibility or shading buffers

Key Formulas (1)

Parallax step

uvnext = uv + viewxy · stepsize
uv_next = uv + view_xy * step_size

Moves texture coordinates along the projected view direction.

Pseudocode

  1. 1.Prepare the inputs and state needed for Parallax Occlusion Mapping.
  2. 2.Apply the height map step while the stopping condition has not been met.
  3. 3.Update intermediate state and discard invalid candidates.
  4. 4.Return rendered image.

Canonical Example

Input
Parallax Occlusion Mapping input with a small representative case
Output
Rendered image
Explanation
Parallax Occlusion Mapping applies height map to produce rendered image.

Implementation Notes

  • Keep the data space for positions, normals, and samples explicit in the implementation.
  • Keep the height map step separate enough to test independently.

Common Pitfalls

  • Mixing coordinate spaces or sampling domains leads to artifacts that are hard to debug.
  • Forgetting to check edge cases can make Parallax Occlusion Mapping look correct on only ideal inputs.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show rays, samples, buffers, or shading terms that contribute to the final pixel.

Parallax Occlusion Mapping mechanism walkthrough step 1 of 4
Step 1 of 4: Prepare the inputs and state needed for Parallax Occlusion Mapping.
rendering-mechanism

Notes

Parallax Occlusion Mapping should be used with the assumptions and tradeoffs of surface Detail in mind.

Sources (1)

What each reference supports for this entry.

Tatarchuk 2006

Paper

Reference for practical parallax occlusion mapping with approximate soft shadows.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Improves onNormal Mapping

Parallax occlusion mapping adds view-dependent depth effects beyond normal perturbation.

Conceptual neighborRay Marching

It often marches through a height field along a view direction.

Tags

GraphicsTexture MappingRay MarchingShading