Skip to content

Commit 0436247

Browse files
mrdoobclaude
andcommitted
PMREMGenerator: Align GGX_SAMPLES across renderers and clean up.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 5d681ed commit 0436247

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/extras/PMREMGenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ class PMREMGenerator {
532532
const incrementalRoughness = Math.sqrt( targetRoughness * targetRoughness - sourceRoughness * sourceRoughness );
533533

534534
// Apply blur strength mapping for better quality across the roughness range
535-
const blurStrength = 0.0 + targetRoughness * 1.25;
535+
const blurStrength = targetRoughness * 1.25;
536536
const adjustedRoughness = incrementalRoughness * blurStrength;
537537

538538
// Calculate viewport position based on output LOD level

src/renderers/common/extras/PMREMGenerator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const EXTRA_LODS = 6;
4141
const BLUR_SAMPLES = 20;
4242

4343
// GGX VNDF importance sampling configuration
44-
const GGX_SAMPLES = 512;
44+
const GGX_SAMPLES = 256;
4545

4646
const _flatCamera = /*@__PURE__*/ new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
4747
const _cubeCamera = /*@__PURE__*/ new PerspectiveCamera( 90, 1 );
@@ -125,7 +125,7 @@ class PMREMGenerator {
125125
* @param {number} [far=100] - The far plane distance.
126126
* @param {Object} [options={}] - The configuration options.
127127
* @param {number} [options.size=256] - The texture size of the PMREM.
128-
* @param {Vector3} [options.renderTarget=origin] - The position of the internal cube camera that renders the scene.
128+
* @param {Vector3} [options.position=origin] - The position of the internal cube camera that renders the scene.
129129
* @param {?RenderTarget} [options.renderTarget=null] - The render target to use.
130130
* @return {RenderTarget} The resulting PMREM.
131131
* @see {@link PMREMGenerator#fromScene}
@@ -634,7 +634,7 @@ class PMREMGenerator {
634634
const incrementalRoughness = Math.sqrt( targetRoughness * targetRoughness - sourceRoughness * sourceRoughness );
635635

636636
// Apply blur strength mapping for better quality across the roughness range
637-
const blurStrength = 0.0 + targetRoughness * 1.25;
637+
const blurStrength = targetRoughness * 1.25;
638638
const adjustedRoughness = incrementalRoughness * blurStrength;
639639

640640
// Calculate viewport position based on output LOD level

0 commit comments

Comments
 (0)