Skip to content

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Nov 25, 2025

Description

This PR improves the physical accuracy of MeshPhysicalMaterial's Sheen implementation.

Changes

  1. Energy Conservation: Adopted Khronos logic (min(1.0 - E(V), 1.0 - E(L))) for direct lighting, ensuring correct attenuation at grazing angles.
  2. Refined BRDF Approximation: Implemented a new analytic fit (using inversesqrt/log) for low roughness (< 0.25) to eliminate "glowing edge" artifacts and accurately capture the sharp Charlie BRDF peak.
  3. Intensity Fix: Corrected RECIPROCAL_PI usage to match environment map brightness.
Before After
Screenshot 2025-11-25 at 11 43 29 AM Screenshot 2025-11-25 at 11 43 21 AM

For reference:

Khronos EEVEE
Screenshot 2025-11-25 at 11 44 33 AM Screenshot 2025-11-25 at 11 44 14 AM

(Made using https://antigravity.google/ with Gemini 3.0)

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

github-actions bot commented Nov 25, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 358.3
86.96
359.15
87.08
+848 B
+121 B
WebGPU 620.64
174.2
620.92
174.22
+281 B
+15 B
WebGPU Nodes 619.25
173.95
619.53
173.96
+281 B
+15 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 490.25
121.78
491.09
121.9
+848 B
+120 B
WebGPU 691.52
189.81
691.8
189.82
+281 B
+14 B
WebGPU Nodes 632.96
172.99
632.96
172.99
+1 B
+0 B

@mrdoob mrdoob merged commit 395f44f into dev Nov 25, 2025
10 checks passed
@mrdoob mrdoob deleted the sheen branch November 25, 2025 13:48
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