wgpu/documentation/shaders.rs
1/*!
2## Shader Support
3
4`wgpu` can consume shaders in [WGSL](https://gpuweb.github.io/gpuweb/wgsl/), SPIR-V, and GLSL.
5Both [HLSL](https://github.com/Microsoft/DirectXShaderCompiler) and [GLSL](https://github.com/KhronosGroup/glslang)
6have compilers to target SPIR-V. All of these shader languages can be used with any backend as we handle all of the conversions. Additionally, support for these shader inputs is not going away.
7
8While WebGPU does not support any shading language other than WGSL, we will automatically convert your
9non-WGSL shaders if you're running on WebGPU.
10
11WGSL is always supported by default, but GLSL and SPIR-V need features enabled to compile in support.
12
13To enable WGSL shaders, enable the `wgsl` feature of `wgpu` (enabled by default).
14To enable SPIR-V shaders, enable the `spirv` feature of `wgpu`.
15To enable GLSL shaders, enable the `glsl` feature of `wgpu`.
16*/