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

WebGPU: Sprites and InterleavedBufferAttribute #24117

Merged
merged 11 commits into from
May 26, 2022
Merged

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented May 24, 2022

WebGPU and NodeMaterial

Example

image

object3d.userData property via NodeMaterial

Certainly, it will reduce the need to create multiples materials to instantiate an "Object3D property" like this example:

import { userData } from 'three-nodes/Nodes.js';

// individual rotation per sprite
material.rotationNode = userData( 'rotation', 'float' ); // get value of: sprite.userData.rotation

This contribution is funded by Google via Igalia

@sunag sunag marked this pull request as ready for review May 24, 2022 07:52
@sunag sunag added this to the r141 milestone May 24, 2022
@sunag sunag merged commit e9a3956 into mrdoob:dev May 26, 2022
@sunag sunag deleted the dev-webgpu-sprites branch May 26, 2022 05:57
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* WebGPUInfo: count sprite triangles

* WebGPU: Add supports to InterleavedBufferAttribute

* Nodes: Split .generateMain() to .generatePosition() and .generateDiffuseColor()

* NodeMaterial: Fix .fogNode for transparent materials

* Add SpriteNodeMaterial

* Add UserDataNode

* Add MaterialNode.ROTATION property

* add webgpu_sprites example

* add comments

* cleanup
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.

2 participants