Skip to content

SpotLightNode: Add custom attenuation using spotLight.attenuationNode #31013

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 2 commits into from
Apr 28, 2025

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Apr 28, 2025

Closes #30993 (comment)

Description

Add custom attenuation using spotLight.attenuationNode.

image

@sunag sunag added this to the r177 milestone Apr 28, 2025
Copy link

github-actions bot commented Apr 28, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.33
78.33
336.33
78.33
+0 B
+0 B
WebGPU 547.56
151.81
547.81
151.88
+251 B
+70 B
WebGPU Nodes 546.91
151.66
547.16
151.73
+251 B
+70 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.78
112.28
465.78
112.28
+0 B
+0 B
WebGPU 622.41
168.39
622.66
168.44
+251 B
+53 B
WebGPU Nodes 577.29
157.65
577.54
157.71
+251 B
+65 B

@sunag sunag marked this pull request as ready for review April 28, 2025 03:28
@sunag sunag merged commit 5ab06a3 into mrdoob:dev Apr 28, 2025
12 checks passed
@sunag sunag deleted the dev-attenuationnode branch April 28, 2025 03:30
@WestLangley
Copy link
Collaborator

@Mugen87

  1. I don't think this PR accommodates the aspect ratio of the texture as in the original feature request. Do you agree?

  2. Do you also see the intensity as relatively brighter on the diagonals in this implementation?

RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
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.

Spotlights Use Rectangular Projection
2 participants