Skip to content

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Aug 29, 2025

Fixes: #31764
Related issue: #31769

Description

@mrdoob told me just now that the release will be published on monday, if it passes the @WestLangley tests, I would go back and merge it into this release if you agree.

I just reapplied the @Mugen87 PR and fixed the FrontFacingNode.

Example
https://jsfiddle.net/vjgan6xh/1/

import { frontFacing, color, select } from 'three/tsl';

// short code simple to test
tubeBottom.material.colorNode = select( frontFacing, color( 0xff0000 ), color( 0x00ff00 ) );
tubeTop.material.colorNode = select( frontFacing, color( 0x0000ff ), color( 0x00ff00 ) );

@sunag sunag marked this pull request as ready for review August 29, 2025 13:29
Copy link

github-actions bot commented Aug 29, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.91
79.11
338.91
79.11
+0 B
+0 B
WebGPU 579.35
159.66
579.25
159.66
-106 B
+6 B
WebGPU Nodes 577.96
159.41
577.85
159.42
-106 B
+7 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 470.78
113.9
470.78
113.9
+0 B
+0 B
WebGPU 649.5
175.53
649.4
175.53
-106 B
+7 B
WebGPU Nodes 603.6
164.67
603.49
164.68
-106 B
+10 B

@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 31, 2025

@sunag If @WestLangley does not respond in time, I would suggest to merge the PR for 180 since it's an improvement over the status quo. Both backends now consistently respond to the scene setup. And the logic is in line with WebGLRenderer.

@sunag sunag added this to the r180 milestone Aug 31, 2025
@sunag sunag merged commit 47aaa53 into mrdoob:dev Aug 31, 2025
9 checks passed
@sunag sunag deleted the dev-frontFace branch August 31, 2025 12:49
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.

WebGPU: Negative scale inverts front-face direction
2 participants