-
Notifications
You must be signed in to change notification settings - Fork 437
Add native WGSL (genwgsl) shader generator with dedicated data library #2996
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
Open
ashwinbhat
wants to merge
22
commits into
AcademySoftwareFoundation:main
Choose a base branch
from
autodesk-forks:bhata/wgsl_generator_with_library
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b1b5d0a
Add native WGSL (genwgsl) shader generator
ashwinbhat 8122045
Add wgsl data library
ashwinbhat f12bb7e
Add three.js/WebGPU viewer backend driven by WgslShaderGenerator
ashwinbhat dc547d0
Add Python binding for WgslShaderGenerator
ashwinbhat 402e599
fixup: disable wgsl SPIRV validation
ashwinbhat ac17415
Merge branch 'main' into bhata/wgsl_generator_with_library
ashwinbhat fae361f
Delete auto-generated wgsl shaders fragments
ashwinbhat bbd7fb2
Enable wgsl data library generation during CI
ashwinbhat a2703ab
fix (build): Enable WGSL on python enabled runners
ashwinbhat 0e96799
Merge branch 'main' into bhata/wgsl_generator_with_library
ashwinbhat 8b0b063
Add developer documentation for WGSL Shader Generation
ashwinbhat 7d89a79
Merge branch 'main' into bhata/wgsl_generator_with_library
ashwinbhat f035fb0
Remove hand-rolled wgsl microfacet library
ashwinbhat 0fe2cc0
Update `glsl_to_wgsl.py` to generate the **entire** `genwgsl` node li…
ashwinbhat 5381863
Implement WGSL prefilter env generation and update supporting shader …
ashwinbhat 774d01a
Rename glsl_to_wgsl
ashwinbhat 0cc09df
Add WGSL transpile tooling and cleanup test suite
ashwinbhat 0eaf114
Update naga and documentation
ashwinbhat 6375934
Add list of glsl transpile skip list
ashwinbhat 4474257
Introduce a math helper mx_isinf
ashwinbhat c106374
Fix: mx_isinf
ashwinbhat c9693a0
[fixup!] Make shader cleanup optional
ashwinbhat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| env: | ||
| RELEASE_TAG: ${{ github.ref_name }} | ||
| NAGA_VERSION: "30.0.0" | ||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
|
|
@@ -28,6 +29,19 @@ jobs: | |
| - name: Create Archive Name | ||
| run: echo "MATERIALX_ARCHIVE=MaterialX-${RELEASE_TAG//v}" >> $GITHUB_ENV | ||
|
|
||
| - name: Install Python | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious if it's possible to call into a shared setup from main and release ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a config that is no Python based, so I kept it separate. |
||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | ||
| with: | ||
| python-version: 3.11 | ||
|
|
||
| - name: Install naga | ||
| run: cargo install naga-cli --locked --version ${NAGA_VERSION} | ||
|
|
||
| - name: Generate WGSL library | ||
| run: | | ||
| python -m pip install -r source/MaterialXGenWgsl/tools/requirements-transpile.txt | ||
| python source/MaterialXGenWgsl/tools/mxgenwgsl.py --libraries libraries --out libraries | ||
|
|
||
| - name: Generate Archives | ||
| run: | | ||
| git archive --prefix ${MATERIALX_ARCHIVE}/ --output ${MATERIALX_ARCHIVE}.zip ${RELEASE_TAG} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed ? If wgsl is available should it not be run still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current validator uses glsllang that does not support wgsl syntax.
Note that the current generator was generating "glsl" code but the new one will generate "wgsl" code