Add support for experimental WESL shader source #17953
Open
+328
−2
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.
Objective
WESL's pre-MVP
0.1.0
has been released!Add support for WESL shader source so that we can begin playing and testing WESL, as well as aiding in their development.
Solution
Adds a
ShaderSource::WESL
that can be used to load.wesl
shaders.Right now, we don't support mixing
naga-oil
. Additionally, WESL shaders currently need to pass through the naga frontend, which the WESL team is aware isn't great for performance (they're working on compiling into naga modules). Also, since our shaders are managed using the asset system, we don't currently support using file based imports likesuper
or package scoped imports. Further work will be needed to asses how we want to support this.Showcase
See the
shader_material_wesl
example. Be sure to press space to activate party mode (trigger conditional compilation)!Screen.Recording.2025-02-20.at.11.59.56.AM.mov