pub enum GpuShaderLanguage3D {
Wgsl,
Msl,
GlslEs3,
Hlsl,
}Expand description
Target GPU shader language backend selected for hardware 3D rendering.
Variants§
Wgsl
WebGPU Shading Language (Web & cross-platform WGPU).
Msl
Apple Metal Shading Language (macOS, iOS, iPadOS).
GlslEs3
OpenGL ES 3.0 / WebGL 2 shading language (WebGL2, Android, HarmonyOS).
Hlsl
DirectX High-Level Shading Language SM 6.0 (Windows D3D12).
Implementations§
Source§impl GpuShaderLanguage3D
Cross-platform GPU 3D shader source lookup for GpuShaderLanguage3D.
impl GpuShaderLanguage3D
Cross-platform GPU 3D shader source lookup for GpuShaderLanguage3D.
Sourcepub fn from_graphics_backend(backend: GraphicsBackend) -> Self
pub fn from_graphics_backend(backend: GraphicsBackend) -> Self
Sourcepub const fn primary_pbr_shader_source(self) -> &'static str
pub const fn primary_pbr_shader_source(self) -> &'static str
Returns the primary unified or vertex 3D Principled BSDF PBR shader source for this shader language.
§Returns
&'static str- Validated GPU 3D PBR shader source string.
Sourcepub const fn fragment_pbr_shader_source(self) -> &'static str
pub const fn fragment_pbr_shader_source(self) -> &'static str
Returns the paired fragment shader source when the backend splits vertex/fragment compilation (GLSL ES 3.0), or the unified shader otherwise.
§Returns
&'static str- Validated GPU 3D PBR fragment shader source string.
Sourcepub const fn compute_morph_skin_cull_shader_source(self) -> &'static str
pub const fn compute_morph_skin_cull_shader_source(self) -> &'static str
Returns the GPU compute shader source implementing pre-skinning Shape Key morphing, 8-bone LBS/DQS skinning, and frustum+Hi-Z+meshlet normal-cone culling.
§Returns
&'static str- Validated GPU compute shader source string.