{
 "id": "oren-nayar",
 "title": "Oren-Nayar rough diffuse",
 "aliases": [],
 "domain": "materials",
 "subdomain": "diffuse model",
 "stage": "material",
 "realtime": "realtime",
 "platforms": [
  "webgl2",
  "webgpu",
  "desktop-gpu",
  "mobile-gpu",
  "unity",
  "unreal",
  "godot",
  "blender"
 ],
 "year_introduced": 1994,
 "inputs": [
  "material-params",
  "normals"
 ],
 "outputs": [
  "radiance"
 ],
 "style": "photoreal",
 "dynamic": "both",
 "summary": "A diffuse model for rough matte surfaces such as clay, plaster or moon dust. It models V-groove microfacets and produces the flat, retro-reflective look Lambert cannot, where brightness barely falls toward the terminator.",
 "how_it_works": "Oren and Nayar replace each Lambertian microfacet assumption with a Gaussian distribution of V-grooves of slope sigma, each facet itself Lambertian. Shadowing, masking and inter-reflection between groove walls add brightness when viewer and light are on the same side, so a full moon looks uniformly bright instead of darkening at the limb. The full model includes an interreflection term; the widely used qualitative form is L = (rho/pi) cos(theta_i) (A + B max(0, cos(phi_i - phi_r)) sin(alpha) tan(beta)) with A = 1 - 0.5 sigma^2/(sigma^2 + 0.33), B = 0.45 sigma^2/(sigma^2 + 0.09), alpha = max(theta_i, theta_r), beta = min(...). At sigma = 0 it reduces to Lambert.",
 "when_to_use": "Choose it for rough diffuse surfaces, skin-adjacent matte looks, planets and unglazed ceramics when Lambert looks too flat and dark at the terminator. Prefer `disney-principled-brdf` diffuse (roughness dependent retro-reflection) if you already use that model, and Lambert plus `kulla-conty-multiscatter` when budget is tight. Prefer `separable-sss` for translucent skin.",
 "cost": {
  "class": "cheap",
  "notes": "A handful of trigonometric or dot-product operations per light; precomputed variants exist."
 },
 "failure_modes": [
  "Qualitative approximation drifts from the full model at grazing view angles",
  "Often combined naively with GGX specular without an energy split, double counting reflectance",
  "Image-based diffuse lighting cannot use the simple irradiance map; the view dependence is lost",
  "Gaussian V-groove assumption does not match measured rough dielectrics exactly"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1145/192161.192213",
   "type": "paper",
   "title": "Generalization of Lambert's reflectance model",
   "authors": [
    "Michael Oren",
    "Shree K. Nayar"
   ],
   "year": 1994,
   "venue": "Proceedings of the 21st annual conference on Computer graphics and interactive techniques  - SIGGRAPH '94",
   "url": "https://doi.org/10.1145/192161.192213",
   "ids": {
    "doi": "10.1145/192161.192213"
   },
   "license": null,
   "extra": {
    "csl_type": "proceedings-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/192161.192213",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/192161.192213",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/192161.192213",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/192161.192213",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/192161.192213",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "oren1994generalization"
  }
 ],
 "presets": [
  {
   "id": "oren-nayar-specimen",
   "title": "Lambert (left) vs Oren-Nayar (right) rough diffuse spheres",
   "runtime": "glsl-fragment",
   "params": {
    "SIGMA": 0.9
   },
   "code": "// Rough diffuse surfaces: Lambert (left) vs Oren-Nayar (right), identical albedo, light and view.\n// Oren-Nayar adds retro-reflection so the rough sphere looks flatter and brighter toward the terminator.\nconst float SIGMA = 0.9;\nconst vec3 ALBEDO = vec3(0.8, 0.72, 0.62);\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n  vec3 ro = vec3(0.0, 0.0, 4.0), rd = normalize(vec3(uv, -2.2));\n  vec3 l = normalize(vec3(0.7, 0.25, 0.65));\n  vec3 col = vec3(0.04) + 0.03 * uv.y;\n  for (int i = 0; i < 2; i++) {\n    vec3 c = vec3(i == 0 ? -0.5 : 0.5, 0.0, 0.0);\n    vec3 oc = ro - c; float b = dot(oc, rd); float h = b * b - dot(oc, oc) + 0.46 * 0.46;\n    if (h < 0.0) continue;\n    float t = -b - sqrt(h); vec3 n = normalize(ro + rd * t - c); vec3 v = -rd;\n    float nl = max(dot(n, l), 0.0), nv = max(dot(n, v), 1e-3);\n    float f = nl;\n    if (i == 1) {\n      float s2 = SIGMA * SIGMA;\n      float A = 1.0 - 0.5 * s2 / (s2 + 0.33), B = 0.45 * s2 / (s2 + 0.09);\n      float ti = acos(clamp(nl, 0.0, 1.0)), tr = acos(clamp(nv, 0.0, 1.0));\n      float al = max(ti, tr), be = min(ti, tr);\n      vec3 lp = l - n * dot(n, l), vp = v - n * dot(n, v);\n      float cp = max(dot(normalize(lp + 1e-5), normalize(vp + 1e-5)), 0.0);\n      f = nl * (A + B * cp * sin(al) * tan(be));\n    }\n    col = ALBEDO * f * 1.4 + ALBEDO * 0.03;\n  }\n  fragColor = vec4(pow(col, vec3(1.0 / 2.2)), 1.0);\n}\n",
   "basis": "original",
   "license_note": "written for this index",
   "execution_fidelity": "faithful-pass",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-29",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "oren-nayar",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-29T15:51:50.471Z",
     "renderer": "Chromium 145.0.7632.6 headless, WebGL2 via ANGLE/SwiftShader, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.3987,
      "std": 0.2622,
      "unique_colors": 77
     },
     "image": "/specimens/oren-nayar-specimen.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "cook-torrance-brdf",
  "disney-principled-brdf",
  "frostbite-pbr"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/materials/oren-nayar.json"
 },
 "solves": [
  "rough matte surfaces like clay look too flat",
  "moon or fabric looks wrong with simple diffuse",
  "dusty surfaces should brighten at grazing angles",
  "lambert diffuse looks too dark on rough materials"
 ],
 "authority": "Oren & Nayar, 1994",
 "url": "https://texelatlas.vercel.app/t/oren-nayar/",
 "execution_fidelity": "faithful-pass",
 "fidelity_label": "Faithful Pass",
 "benchmark_eligible": true,
 "gpu_weight": {
  "weight_x": 1.18,
  "tier": "feather",
  "p50_ms": 0.0389,
  "p95_ms": 0.0411,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 40,
  "preset_id": "oren-nayar-specimen",
  "execution_fidelity": "faithful-pass",
  "fidelity_label": "Faithful Pass",
  "benchmark_eligible": true,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 1.01,
   "tier": "feather",
   "p50_ms": 0.016,
   "p95_ms": 0.0163,
   "speedup_x": 2.43,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 1,
   "tier": "feather",
   "p50_ms": 0.0288,
   "p95_ms": 0.0288,
   "speedup_x": 1.35,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}