mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
add support for .comp glsl shaders (#6084)
# Objective - Support `.comp` extension for glsl compute shaders ## Solution - Add `.comp` to the shader asset loader
This commit is contained in:
parent
dc3f801239
commit
deb07fe957
1 changed files with 5 additions and 1 deletions
|
@ -254,6 +254,10 @@ impl AssetLoader for ShaderLoader {
|
|||
String::from_utf8(Vec::from(bytes))?,
|
||||
naga::ShaderStage::Fragment,
|
||||
),
|
||||
"comp" => Shader::from_glsl(
|
||||
String::from_utf8(Vec::from(bytes))?,
|
||||
naga::ShaderStage::Compute,
|
||||
),
|
||||
_ => panic!("unhandled extension: {}", ext),
|
||||
};
|
||||
|
||||
|
@ -279,7 +283,7 @@ impl AssetLoader for ShaderLoader {
|
|||
}
|
||||
|
||||
fn extensions(&self) -> &[&str] {
|
||||
&["spv", "wgsl", "vert", "frag"]
|
||||
&["spv", "wgsl", "vert", "frag", "comp"]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue