load_wgsl

Function load_wgsl 

Source
pub(crate) fn load_wgsl(
    device: &Device,
    label: &str,
    source: &'static str,
) -> ShaderModule
Expand description

Compile an inline WGSL source string into a [wgpu::ShaderModule] with the supplied label.

The source is taken as 'static to encourage call sites to pass include_str!("../shaders/<name>.wgsl") (the dominant pattern) rather than building a string at runtime.