Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Jun 8, 2025

Description

Rename premult to premultiplyAlpha and update examples.

/cc @mrdoob @WestLangley

@sunag sunag added this to the r178 milestone Jun 8, 2025
@github-actions
Copy link

github-actions bot commented Jun 8, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.4
78.67
337.4
78.67
+0 B
+0 B
WebGPU 554.99
153.64
554.99
153.61
-1 B
-31 B
WebGPU Nodes 554.34
153.49
554.34
153.46
-1 B
-31 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 468.59
113.33
468.59
113.33
+0 B
+0 B
WebGPU 629.96
170.36
630.02
170.38
+55 B
+22 B
WebGPU Nodes 584.81
159.69
584.87
159.73
+55 B
+38 B

@sunag sunag changed the title TSL: Rename premultto premultiplyAlpha TSL: Rename premult to premultiplyAlpha Jun 8, 2025
@sunag sunag marked this pull request as ready for review June 8, 2025 03:52
@sunag sunag merged commit f5b96f8 into mrdoob:dev Jun 8, 2025
12 checks passed
@sunag sunag deleted the dev-rename-premult branch June 8, 2025 03:58
@WestLangley
Copy link
Collaborator

WestLangley commented Jun 8, 2025

@sunag Can you please check. This is breaking #31166 for me. That is, the line of code that multiplies by alpha is not being appended to the shader.

@sunag
Copy link
Collaborator Author

sunag commented Jun 8, 2025

@sunag Can you please check. This is breaking #31166 for me. That is, the line of code that multiplies by alpha is not being appended to the shader.

Now it has been replaced by a function:

fn fn0 ( color : vec4<f32> ) -> vec4<f32> {

	return vec4<f32>( ( color.xyz * vec3<f32>( color.w ) ), color.w );

}
...
nodeVar = fn0( ... );

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