Skip to content

Unified GPU shaders#3483

Open
billti wants to merge 7 commits into
mainfrom
billti/unified-wgsl
Open

Unified GPU shaders#3483
billti wants to merge 7 commits into
mainfrom
billti/unified-wgsl

Conversation

@billti

@billti billti commented Jul 17, 2026

Copy link
Copy Markdown
Member

This PR merges the base and adaptive shaders back into one shader (WGSL) file. This removes a bunch of duplication that had to be kept in sync. (The bulk of the lines changed are merging code from the old wgsl files into the new one).

It also enables using tools such as the wgsl-analyzer VS Code extension https://github.com/wgsl-analyzer/wgsl-analyzer to reason about the file wholistically. I added regions the extension recognizes so the common areas can be collapsed for easy navigation...

image

And when the extension can see all the code it enables type inlay hints, goto def, etc.

image

This unification also puts in place the structure for some further optimizations I want to experiement with in the near future.

@billti

billti commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

Note, there's a few wgsl-analyzer bugs on the backlog to be fixed before this code will show error free, specifically the below (that I know of right now), so expect some spurious errors in the editor still in the meantime

wgsl-analyzer/wgsl-analyzer#703
wgsl-analyzer/wgsl-analyzer#1317
wgsl-analyzer/wgsl-analyzer#1318

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.

1 participant