Skip to content

FrontFacingNode: Fix frontFacing if used material.flatShading #30828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2025

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Mar 30, 2025

Related issue: #30823 (comment)

Description

Fix frontFacing if used material.flatShading.

@sunag sunag added this to the r176 milestone Mar 30, 2025
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.08
78.29
336.08
78.29
+0 B
+0 B
WebGPU 532.77
148.04
532.74
148.03
-25 B
-11 B
WebGPU Nodes 532.24
147.94
532.21
147.93
-25 B
-12 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.09
112.16
465.09
112.16
+0 B
+0 B
WebGPU 604.41
164.01
604.38
164
-25 B
-9 B
WebGPU Nodes 559.39
153.46
559.37
153.45
-25 B
-9 B

@sunag sunag marked this pull request as ready for review March 30, 2025 21:14
@sunag sunag merged commit 62bb685 into mrdoob:dev Mar 30, 2025
12 checks passed
@sunag sunag deleted the dev-fix-flatShading branch March 30, 2025 21:15
@WestLangley
Copy link
Collaborator

@sunag WebGPU is looking better! :-)

There are still console errors for both backends when the geometry has tangents, a normal map is present, and flat shading is true.

If it is not an easy fix, I can file a bug report if you wish.

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 31, 2025

If you share a fiddle, I can take a look!

@sunag
Copy link
Collaborator Author

sunag commented Mar 31, 2025

Hi! Thanks @WestLangley. @Mugen87 I fixed here, I will post this PR soon.

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.

3 participants