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 <110625288+hg127@users.noreply.github.com>
This commit is contained in:
parent
489dca774c
commit
27221622b0
@ -773,9 +773,7 @@ fn parse_examples() -> Vec<Example> {
|
||||
let technical_name = val.get("name").unwrap().as_str().unwrap().to_string();
|
||||
|
||||
let source_code = fs::read_to_string(val["path"].as_str().unwrap()).unwrap();
|
||||
let shader_regex =
|
||||
Regex::new(r"(shaders\/\w+\.wgsl)|(shaders\/\w+\.frag)|(shaders\/\w+\.vert)")
|
||||
.unwrap();
|
||||
let shader_regex = Regex::new(r"shaders\/\w+\.(wgsl|frag|vert|wesl)").unwrap();
|
||||
|
||||
// Find all instances of references to shader files, and keep them in an ordered and deduped vec.
|
||||
let mut shader_paths = vec![];
|
||||
|
Loading…
Reference in New Issue
Block a user