Skip to content
CoreSource checked

Importance Sampling BRDF

Samples BRDF directions with a matching PDF so Monte Carlo paths spend more work on likely scattering directions.

Quick Facts

Compact metadata for implementation and discovery.

Category
Rendering
Difficulty
Advanced
Family
Light Transport Sampling
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
9
Code example
Ready
Visualization
Ready

Overview

BRDF importance sampling draws an incoming light direction from a material-dependent distribution, evaluates the BRDF, cosine factor, and PDF in the same measure, then weights the sample by contribution divided by that PDF.

Core Concepts

BRDF samplingprobability densitycosine termMonte Carlo estimatorpath throughputmeasure consistency

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(samples)

Average

O(samples)

Worst

O(samples)

Space

O(1)

When to Use

  • Use when the BRDF has a sampler and PDF that are implemented in the same coordinate measure.
  • Use when material scattering dominates variance more than direct light selection.

When Not to Use

  • Avoid when the PDF cannot be evaluated for the sampled direction.
  • Avoid relying only on BRDF sampling for small bright lights; pair it with light sampling when needed.

What It Does

  • Biases sampled scattering directions toward high-contribution BRDF lobes.
  • Returns both a sampled direction and the probability density used to draw it.
  • Reduces variance when the BRDF sampler matches the material response well.

Use Cases

  • Path tracing glossy, diffuse, or mixed materials with known BRDF sampling routines.
  • Reducing noise from material scattering compared with uniform hemisphere sampling.
  • Combining BSDF sampling with light sampling through multiple importance sampling.

Inputs

  • Scene geometry
  • Materials
  • Camera and lighting state

Outputs

  • Rendered image
  • Visibility or shading buffers

Key Formulas (1)

BRDF sample contribution

contribution = Li(wi) · fr(wo, wi) · cos(θi) / pdf(wi)
contribution = L_i(w_i) * f_r(w_o, w_i) * cos(theta_i) / pdf(w_i)

Weights a sampled lighting direction by its radiance, BRDF value, cosine term, and sampling probability density.

Pseudocode

  1. 1.Build a local shading frame from the surface normal
  2. 2.Sample an incoming direction wi from the BRDF distribution
  3. 3.Evaluate the BRDF value, cosine term, and PDF for wi
  4. 4.If the PDF is zero, discard the sample
  5. 5.Trace or evaluate incoming radiance along wi
  6. 6.Accumulate radiance * BRDF * cosine / PDF

Canonical Example

Input
a glossy surface hit by a camera ray, with roughness 0.2 and outgoing direction wo
Output
sample an incoming direction wi near the mirror lobe and weight it by BRDF * cos(theta) / pdf(wi)
Explanation
More samples land near directions likely to contribute, while the PDF weight keeps the estimate unbiased.

Implementation Notes

  • Return sample direction, BRDF value, PDF, and lobe flags together.
  • Transform between local shading space and world space consistently.
  • Use multiple importance sampling when combining BRDF samples with explicit light samples.

Common Pitfalls

  • The sampled direction, PDF, cosine factor, and BRDF value must use compatible measures and coordinate spaces.
  • Forgetting the cosine term or dividing by the wrong PDF biases the estimator.
  • Delta distributions and mixed lobes need special sampling and PDF handling.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

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

Importance Sampling BRDF mechanism walkthrough step 1 of 6
Step 1 of 6: Build a local shading frame from the surface normal
rendering-mechanism

Notes

Importance sampling changes variance, not the rendering equation; mismatched PDFs or measures create biased images.

Sources (1)

What each reference supports for this entry.

Physically Based Rendering

Book

Rendering reference for light transport, ray tracing, sampling, BRDFs, acceleration structures, and path termination.

Open source

Explore Next

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

BRDF sampling applies importance sampling to material scattering directions.

Path tracers use BRDF sampling to reduce variance from material scattering.

Often paired withNext Event Estimation

BRDF sampling is often combined with explicit light sampling using multiple importance sampling.

Tags

GraphicsBRDFSamplingLighting