fullseye

brdf_microfacet — SPECULAR reflectance op

使い方

GGX / Trowbridge-Reitz microfacet specular BRDF. → (H, W), units 1/sr.

f_s = D * G * F / (4 (n.l) (n.v)) with

Exact ground truth it reproduces: at normal incidence with light, view and normal aligned, every geometric factor is 1 and the value collapses to f0 / (4 pi roughness^4) in closed form — reproduced bit for bit at roughness 0.3, 0.5 and 1.0 and to 3.3e-16 relative at roughness 0.1, which took rewriting the GGX denominator to avoid a cancellation (see the comment at the code; the textbook arrangement was off by 2.2e-13 relative at the peak). The lobe is reciprocal in light and view to machine precision (measured 1.7e-16), and its maximum sits at the half-vector.

roughness is the perceptual parameter, squared once to reach the GGX alpha — the convention that makes a linear slider feel linear. A perfectly smooth surface (roughness = 0) is a delta function, not a finite BRDF, so it is refused rather than returned as an infinity.

Raises ValueError: geometry problems as in :func:brdf_blinn_phong; roughness outside (0, 1]; f0 outside [0, 1].

詳しい使い方ガイド

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(image2d を入力に取れる)

polarization_render

同カテゴリ(reflectance)

brdf_blinn_phong · dichromatic_render


Provenance: specularity.py — SPECULAR operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.