Skip to content

Commit 2722162

Browse files
atlasgornmockersf
authored andcommitted
Added support for .wesl files to the regex pattern for examples (#19178)
## Objective [Shaders / Material - WESL](https://bevyengine.org/examples-webgpu/shaders/shader-material-wesl/) example doesn't have a WESL file tab ## Solution Added wesl to regex --------- Co-authored-by: Stepan Urazov <[email protected]>
1 parent 489dca7 commit 2722162

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tools/example-showcase/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,7 @@ fn parse_examples() -> Vec<Example> {
773773
let technical_name = val.get("name").unwrap().as_str().unwrap().to_string();
774774

775775
let source_code = fs::read_to_string(val["path"].as_str().unwrap()).unwrap();
776-
let shader_regex =
777-
Regex::new(r"(shaders\/\w+\.wgsl)|(shaders\/\w+\.frag)|(shaders\/\w+\.vert)")
778-
.unwrap();
776+
let shader_regex = Regex::new(r"shaders\/\w+\.(wgsl|frag|vert|wesl)").unwrap();
779777

780778
// Find all instances of references to shader files, and keep them in an ordered and deduped vec.
781779
let mut shader_paths = vec![];

0 commit comments

Comments
 (0)