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

RectAreaLightNode: Fix update(). #29771

Merged
merged 1 commit into from
Oct 30, 2024
Merged

RectAreaLightNode: Fix update(). #29771

merged 1 commit into from
Oct 30, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Oct 30, 2024

Related issue: -

Description

The PR fixes a bug in RectAreaLightNode that appears when you produce a frame with more than one render() call and different cameras. My use case was updating a CubeCamera per frame and using its cube render target as a texture for objects.

The default update type of analytical light nodes in FRAME. This is fine for most modules but RectAreaLightNode depends on the view matrix in its update() method. If there is only a single update per frame, RectAreaLightNode uses wrong uniform values when rendering the scene with subsequent cameras.

Copy link

github-actions bot commented Oct 30, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 691.67
171.43
691.67
171.43
+0 B
+0 B
WebGPU 820.87
221.46
820.87
221.46
+0 B
+0 B
WebGPU Nodes 820.38
221.33
820.38
221.33
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 463.82
112.17
463.82
112.17
+0 B
+0 B
WebGPU 541.7
146.38
541.7
146.38
+0 B
+0 B
WebGPU Nodes 497.7
136.21
497.7
136.21
+0 B
+0 B

@Mugen87 Mugen87 added this to the r170 milestone Oct 30, 2024
@Mugen87 Mugen87 merged commit 83c3f72 into mrdoob:dev Oct 30, 2024
22 checks passed
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