Skip to content
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

TSL: Vertex shader revision #30108

Merged
merged 7 commits into from
Dec 12, 2024
Merged

TSL: Vertex shader revision #30108

merged 7 commits into from
Dec 12, 2024

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Dec 12, 2024

Related issue: #29555 (comment), #29659 (comment)

Description

The PR fixes the SpriteMaterial fog and brings some improvements related to MVP and Vertex.

  • Fix fog in SpriteMaterial and SpriteNodeMaterial
  • NodeMaterial: Add .setupPositionView()
  • NodeMaterial: Add .setupVertex()
  • modelViewProjection is a const now instead of a function like modelViewProjection()
  • Add mediumpModelViewMatrix
  • Rename highPrecisionModelNormalViewMatrix -> highpModelNormalViewMatrix
  • Rename highPrecisionModelViewMatrix -> highpModelViewMatrix

@sunag sunag added this to the r172 milestone Dec 12, 2024
Copy link

github-actions bot commented Dec 12, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.21
79.01
339.21
79.01
+0 B
+0 B
WebGPU 486.3
134.97
486.18
134.92
-123 B
-54 B
WebGPU Nodes 485.76
134.87
485.64
134.82
-123 B
-52 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.1
112.06
465.1
112.06
+0 B
+0 B
WebGPU 555.41
150.39
555.32
150.35
-91 B
-46 B
WebGPU Nodes 511.26
140.1
511.23
140.11
-30 B
+5 B

@sunag sunag marked this pull request as ready for review December 12, 2024 07:24
@mrdoob
Copy link
Owner

mrdoob commented Dec 12, 2024

Maybe we can follow use WebGL's lowp, mediump and highp?

lowpModelViewMatrix
mediumpModelViewMatrix
highpModelViewMatrix

@sunag sunag merged commit 0d57860 into mrdoob:dev Dec 12, 2024
12 checks passed
@sunag sunag deleted the dev-vertex branch December 12, 2024 17:57
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