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

Examples: WebGPU WGSL/TSL Node Interoperability #28379

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from

Conversation

cmhhelgeson
Copy link
Contributor

@cmhhelgeson cmhhelgeson commented May 14, 2024

Using a CRT shader adapted from a linked source, I added an example demonstrating how nodes can be interchangeably used as arguments in WGSL functions and manipulated within TSL functions, ultimately producing the same visual output in each.

webgpu_tsl_interoperability

https://raw.githack.com/cmhhelgeson/three.js/webgpu_wgsl_shader/examples/webgpu_tsl_interoperability.html

…strates how to use the same node variables across both wgsl and tsl version of the same shader, as well as demonstrating how to use varying attributes in both wgsl and tsl shaders
@sunag
Copy link
Collaborator

sunag commented May 16, 2024

Thanks for first contributor. Do you can follow mrdoob code style?

@cmhhelgeson
Copy link
Contributor Author

Thanks for first contributor. Do you can follow mrdoob code style?

Yes, I will run the linter again.

@mrdoob
Copy link
Owner

mrdoob commented May 17, 2024

Yes, I will run the linter again.

Please, don't rely just on running the linter.

Check this link to see the code indentations that need clean up:
https://github.com/mrdoob/three.js/pull/28379/files

@sunag sunag added this to the r165 milestone May 23, 2024
…ders using the same uniforms, removed black line between quads, fixed cellOffset issue
@mrdoob mrdoob modified the milestones: r165, r166 May 31, 2024
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.

None yet

3 participants