Skip to content

Renderers: Disable bump mapping for wireframe rendering.#33777

Merged
mrdoob merged 1 commit into
devfrom
bump-wireframe
Jun 12, 2026
Merged

Renderers: Disable bump mapping for wireframe rendering.#33777
mrdoob merged 1 commit into
devfrom
bump-wireframe

Conversation

@mrdoob

@mrdoob mrdoob commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Related issue: #31242

Description

While working on #33776 I noticed that some models renderer black in wireframe mode.

Screenshot 2026-06-12 at 15 39 38

Turns out bumpMap was the culprit.

Bump mapping relies on screen-space derivatives, which are unreliable on thin lines — bump-mapped materials render mostly black in wireframe.

Disables the bump perturbation when material.wireframe is true, in both BumpMapNode and WebGLPrograms. Same approach as #31242, which gated flatShading (also derivative-based) for the same reason — including the same compromise: toggling wireframe at runtime requires material.needsUpdate = true.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mrdoob mrdoob added this to the r185 milestone Jun 12, 2026
@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.48
86.82
365.5
86.83
+18 B
+4 B
WebGPU 666.43
184.37
666.47
184.38
+40 B
+13 B
WebGPU Nodes 664.47
184.06
664.51
184.07
+40 B
+13 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 507.44
123.35
507.46
123.35
+18 B
+5 B
WebGPU 745.68
200.56
745.72
200.58
+40 B
+11 B
WebGPU Nodes 694.9
188
694.94
188.02
+40 B
+13 B

@mrdoob mrdoob merged commit 40774d6 into dev Jun 12, 2026
10 checks passed
@mrdoob mrdoob deleted the bump-wireframe branch June 12, 2026 07:10
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.

1 participant