Skip to content

TSL: Fix reflector() clear texture and stop update if bounce is false #31110

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
May 15, 2025

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented May 14, 2025

Description

The PR fixed two issues:

  • Clears the texture if it is not in the viewing angle to avoid artifacts generated in the material that is projected.
  • If bounce=false and it is not in the viewing angle, reflector() stops working.

@sunag sunag added this to the r177 milestone May 14, 2025
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.26
78.64
337.26
78.64
+0 B
+0 B
WebGPU 549.59
152.34
549.71
152.38
+120 B
+43 B
WebGPU Nodes 548.94
152.19
549.06
152.23
+120 B
+43 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 467.34
112.95
467.34
112.95
+0 B
+0 B
WebGPU 624.5
169.06
624.5
169.06
+0 B
+0 B
WebGPU Nodes 579.35
158.35
579.35
158.35
+0 B
+0 B

@sunag sunag marked this pull request as ready for review May 15, 2025 04:41
@sunag sunag merged commit 02d84d2 into mrdoob:dev May 15, 2025
12 checks passed
@sunag sunag deleted the dev-reflector-fix branch May 15, 2025 04:42
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