-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Introduce storageStruct #29908
Open
Spiri0
wants to merge
25
commits into
mrdoob:dev
Choose a base branch
from
Spiri0:storageStruct
base: dev
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.
+458
−5
Open
Introduce storageStruct #29908
Changes from 17 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
52939b2
storageStruct
13461f0
Update StructTypeNode.js
Spiri0 0930b48
Extended functionality to vertex and fragment shaders too
8ed8822
Merge branch 'storageStruct' of github.com:Spiri0/three.js into stora…
eefe48a
improved struct name managment
d76a0e6
improved struct name managment
b613aa8
Update WGSLNodeBuilder.js
Spiri0 273e588
Update WGSLNodeBuilder.js
Spiri0 5341a29
Update WGSLNodeBuilder.js
Spiri0 28fb56d
Update WGSLNodeBuilder.js
Spiri0 7850209
Update WGSLNodeBuilder.js
Spiri0 a072a6e
Update WGSLNodeBuilder.js
Spiri0 99218be
Update WGSLNodeBuilder.js
Spiri0 4d618cb
Update WGSLNodeBuilder.js
Spiri0 a512721
Update WGSLNodeBuilder.js
Spiri0 4882f9e
Update WGSLNodeBuilder.js
Spiri0 1f646fd
Update WGSLNodeBuilder.js
Spiri0 baa6d0c
update getCustomStructNameFromShader
9f9b70d
update getCustomStructNameFromShader
d704d92
update getCustomStructNameFromShader
6f5ec07
add isArray input parameter check for their existance
fb96b7e
add isArray input parameter check for their existance without .?
4861c3a
add new example to show usage of struct and storageStruct
3ea0f3a
new screenshot
f49feaa
Update webgpu_struct_drawIndirect.html
Spiri0 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 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 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 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 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
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.
It's strange to me to find regular expression here. This shouldn't happen when code is generated from nodes, and not the other way around or reprocessed.
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.
I originally had the parser in mind that you also use for the pointers because it is part of the WGSLNodeBuilder. However, the parser does not recognize
stageData.codes
as WGSL code, so it always thrown an error. At first I thought that this would only be the case with compute shaders because the-> void
expression instageData.codes
is missing._getWGSLComputeCode
doesn't have that. But even when trying to use vertex and fragment shaders, the parser slipped into the else expression because it didn't recognize the shaders fromstageData.codes
as WGSL shaders.So far
stageData.codes
is not used anywhere. It was only created. In your opinion, does the code fromstageData.codes
have to be compatible with the parser?I then concentrated on reading out only the header, i.e. the part in the ( ), since the rest is not important. That seemed to me to be the safest and most stable way. If you see a better way to extract the datas from the shaders I welcome your idea. I originally wanted to forego the function entirely and do it with the parser.
Is the process clear from the review text?