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

Add support for experimental WESL shader source #17953

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tychedelia
Copy link
Contributor

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 like super 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

@TimJentzsch TimJentzsch added C-Feature A new feature, making something new possible A-Assets Load files from disk to use for things like images, models, and sounds O-WebGPU Specific to the WebGPU render API S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 20, 2025
@TimJentzsch TimJentzsch added A-Rendering Drawing game state to the screen and removed A-Assets Load files from disk to use for things like images, models, and sounds labels Feb 20, 2025
@alice-i-cecile alice-i-cecile added the M-Needs-Release-Note Work that should be called out in the blog due to impact label Feb 20, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Feb 20, 2025

impl Plugin for CustomMaterialPlugin {
fn build(&self, app: &mut App) {
load_internal_asset!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible M-Needs-Release-Note Work that should be called out in the blog due to impact O-WebGPU Specific to the WebGPU render API S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants