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

Merged
merged 17 commits into from
Jun 11, 2024

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
@cmhhelgeson cmhhelgeson requested a review from sunag June 10, 2024 22:10
@sunag sunag merged commit d2c12df into mrdoob:dev Jun 11, 2024
11 checks passed
@cmhhelgeson cmhhelgeson deleted the webgpu_wgsl_shader branch June 11, 2024 05:09
@Methuselah96 Methuselah96 mentioned this pull request Jun 19, 2024
36 tasks
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.

3 participants