Skip to content

WebGPURenderer: Add per-attachment MRT blending support#32636

Merged
sunag merged 2 commits into
mrdoob:devfrom
sunag:dev-mrt
Dec 31, 2025
Merged

WebGPURenderer: Add per-attachment MRT blending support#32636
sunag merged 2 commits into
mrdoob:devfrom
sunag:dev-mrt

Conversation

@sunag

@sunag sunag commented Dec 30, 2025

Copy link
Copy Markdown
Collaborator

Related issue: #32570

Description

The PR adds blending per attachment, which can be useful for custom applications;

The bloom_emissive example has been updated to support transparency using the new approach.

It's likely we'll use bloom_emissive for something that utilizes HDR output; there are still points for visual customization, such as the relationship between the bloom's glow and the object's color, increasing the glow while preserving color nuance. The current example makes things more customizable, which is also a positive thing not only for this but for other things.

const mrtNode = mrt( {
	output: output,
	emissive: vec4( emissive, output.a )
} );

mrtNode.setBlendMode( 'emissive', new THREE.BlendMode( THREE.NormalBlending ) );

scenePass.setMRT( mrtNode );

@sunag sunag added this to the r183 milestone Dec 30, 2025
@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 355.34
84.47
355.36
84.47
+17 B
+4 B
WebGPU 618.9
171.93
621.44
172.53
+2.54 kB
+600 B
WebGPU Nodes 617.5
171.68
620.04
172.29
+2.54 kB
+606 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 487.5
119.33
487.5
119.33
+0 B
+0 B
WebGPU 691.16
187.57
692.69
187.93
+1.53 kB
+355 B
WebGPU Nodes 641
174.81
642.53
175.17
+1.53 kB
+361 B

@sunag sunag marked this pull request as ready for review December 30, 2025 23:03
@sunag sunag merged commit 01ae0d1 into mrdoob:dev Dec 31, 2025
10 checks passed
@sunag sunag deleted the dev-mrt branch December 31, 2025 02:14
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