Skip to content

ShadowMaterial: Respect "premultiplied alpha"#32550

Merged
mrdoob merged 1 commit into
mrdoob:devfrom
gkjohnson:shadow-shader-premult
Dec 14, 2025
Merged

ShadowMaterial: Respect "premultiplied alpha"#32550
mrdoob merged 1 commit into
mrdoob:devfrom
gkjohnson:shadow-shader-premult

Conversation

@gkjohnson

Copy link
Copy Markdown
Collaborator

Related issue: #32472

Description

Adjusts the "ShadowMaterial" shader to respect the premultiplied alpha flag. This was causing the "physics_ammo_instancing" to fail previously when setting "premultipliedAlpha" to true:

Before
image

After
image

@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 355.12
84.44
355.16
84.44
+43 B
+1 B
WebGPU 616.54
171.12
616.54
171.12
+0 B
+0 B
WebGPU Nodes 615.14
170.85
615.14
170.85
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 487.3
119.32
487.34
119.31
+43 B
-1 B
WebGPU 687.29
186.66
687.29
186.66
+0 B
+0 B
WebGPU Nodes 637.13
173.88
637.13
173.88
+0 B
+0 B

@mrdoob mrdoob added this to the r183 milestone Dec 14, 2025
@mrdoob mrdoob merged commit 0bc25c1 into mrdoob:dev Dec 14, 2025
10 checks passed
@gkjohnson gkjohnson deleted the shadow-shader-premult branch March 7, 2026 14:41
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