Skip to content

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Nov 28, 2025

Related issue: #32356

Description

Replaces the piecewise IBLSheenBRDF curve-fit with an improved unified formula.

Before After
Screenshot 2025-11-28 at 09 11 20 Screenshot 2025-11-28 at 09 11 24

Changes:

  • 5x better approximation accuracy (62% → 13% average error vs ground truth)
  • Removes branch (roughness < 0.25 check)
  • Removes log() call
  • Simpler and more efficient

The new coefficients were optimized by numerically integrating the Charlie sheen BRDF over the hemisphere and fitting across the full roughness range.

(Made using Claude Code with Opus 4.5)

@mrdoob mrdoob added this to the r182 milestone Nov 28, 2025
@github-actions
Copy link

github-actions bot commented Nov 28, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 350.29
83.05
350.27
83.05
-22 B
+4 B
WebGPU 613.67
170.41
613.66
170.42
-10 B
+1 B
WebGPU Nodes 612.27
170.14
612.26
170.14
-10 B
+3 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 482.28
117.83
482.26
117.84
-22 B
+2 B
WebGPU 684.81
186.19
684.8
186.19
-10 B
+4 B
WebGPU Nodes 634.64
173.38
634.64
173.38
+0 B
+0 B

@mrdoob mrdoob merged commit 6342bfc into dev Nov 28, 2025
10 checks passed
@mrdoob mrdoob deleted the iblsheen branch November 28, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants