Skip to content

WebGLState: Fix polygon offset with reversed depth buffer.#32832

Merged
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev2
Jan 23, 2026
Merged

WebGLState: Fix polygon offset with reversed depth buffer.#32832
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev2

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jan 23, 2026

Fixed #32827.

Description

As suggested in #32827 (comment), polygonOffsetFactor is negated (similar to shadow bias) when reversed depth buffer is enabled.

@github-actions
Copy link

github-actions bot commented Jan 23, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 356.71
84.7
356.74
84.71
+24 B
+8 B
WebGPU 621.9
172.71
621.9
172.71
+0 B
+0 B
WebGPU Nodes 620.5
172.47
620.5
172.47
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 489.5
119.71
489.52
119.73
+24 B
+14 B
WebGPU 692.87
188.01
692.87
188.01
+0 B
+0 B
WebGPU Nodes 642.53
175.19
642.53
175.19
+0 B
+0 B

@Mugen87 Mugen87 added this to the r183 milestone Jan 23, 2026
@Mugen87 Mugen87 merged commit e5d3e4e into mrdoob:dev Jan 23, 2026
10 checks passed
@haxiomic
Copy link
Contributor

Wow, thank you for the quick fix @Mugen87!

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.

Material polygonOffset does not respect depth coordinate system

2 participants