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

Nodes: InstancedPointsNodeMaterial - Add pointWidthNode #29236

Merged
merged 9 commits into from
Aug 29, 2024

Conversation

cmhhelgeson
Copy link
Contributor

@cmhhelgeson cmhhelgeson commented Aug 27, 2024

Description

Add the ability to apply a per instance size attribute to the InstancedPointsGeometry, and access that attribute within the InstancedPointsNodeMaterial. The existing approach is extended, specifying via parameters that the material should access the instanceSize attribute of the relevant geometry rather than the uniform width value passed directly to the material. However, we could modify the material down the line to use an approach more in line with existing node materials, where the output is modified by applying nodes to the material ( such as a positionNode or sizeNode ) rather than setting static parameters that determine the nodes the material creates internally.

Untitled.video.6.mp4

@cmhhelgeson cmhhelgeson marked this pull request as ready for review August 27, 2024 18:37
@cmhhelgeson cmhhelgeson force-pushed the update_instanced_points branch from 4246ef5 to cd55da0 Compare August 27, 2024 20:13
Copy link

github-actions bot commented Aug 27, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
685.4 kB (169.7 kB) 685.4 kB (169.7 kB) +0 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
462 kB (111.4 kB) 462 kB (111.4 kB) +0 B

@cmhhelgeson
Copy link
Contributor Author

cmhhelgeson commented Aug 27, 2024

The screenshot appears to be passing in local tests. I've tried passing in a new one, but Git keeps indicating that the new image cannot be pushed in, as it is the same as the current one.

EDIT: I think I will just add the example as an exception to puppeteer for now.

@cmhhelgeson cmhhelgeson changed the title Nodes: InstancedPointsNodeMaterial - InstanceSize support Nodes: InstancedPointsNodeMaterial - Add pointSizeNode Aug 29, 2024
@cmhhelgeson cmhhelgeson force-pushed the update_instanced_points branch from 2d66689 to 7770831 Compare August 29, 2024 01:25
@sunag
Copy link
Collaborator

sunag commented Aug 29, 2024

Sometimes it is necessary to update the build to take the screenshot.

@sunag sunag changed the title Nodes: InstancedPointsNodeMaterial - Add pointSizeNode Nodes: InstancedPointsNodeMaterial - Add pointWidthNode Aug 29, 2024
@sunag sunag added this to the r168 milestone Aug 29, 2024
@sunag sunag added the WebGPU label Aug 29, 2024
@sunag sunag merged commit 7506a35 into mrdoob:dev Aug 29, 2024
12 checks passed
@cmhhelgeson cmhhelgeson deleted the update_instanced_points branch September 6, 2024 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants