Skip to content

TSL: Introduce ambientOcclusion property#33728

Merged
sunag merged 10 commits into
mrdoob:devfrom
sunag:dev-tsl-ao
Jun 5, 2026
Merged

TSL: Introduce ambientOcclusion property#33728
sunag merged 10 commits into
mrdoob:devfrom
sunag:dev-tsl-ao

Conversation

@sunag

@sunag sunag commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Related issue: #33721

Description

This PR introduces ambientOcclusion property.

It was also added placeholderNode, which, unlike a default value, is only assigned if no assignment is made to that node, since the output value of an ambient occlusion when unused should be 1.

NodeBuilder.hasWriteUsage( node ) was also added, and it is part of another PR that I will make next for shader optimization.

@sunag sunag added this to the r185 milestone Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.48
86.82
365.48
86.82
+0 B
+0 B
WebGPU 660.41
182.79
661.42
183.06
+1.01 kB
+261 B
WebGPU Nodes 658.46
182.49
659.46
182.76
+1.01 kB
+268 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 507.15
123.31
507.15
123.31
+0 B
+0 B
WebGPU 739.03
198.94
740.02
199.19
+986 B
+254 B
WebGPU Nodes 688.25
186.26
689.24
186.53
+986 B
+265 B

@sunag sunag marked this pull request as ready for review June 5, 2026 18:52
@sunag sunag merged commit 9e16efc into mrdoob:dev Jun 5, 2026
10 checks passed
@sunag sunag deleted the dev-tsl-ao branch June 5, 2026 20:55
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