Expand description
Built-in shader sources for the Khora Engine rendering system.
This module provides compile-time embedded shader source code for the core rendering strategies. These shaders are part of the “Strategies” layer in the SAA/CLAD architecture, representing the GPU execution paths for various render lanes.
§Available Shaders
LIT_FORWARD_WGSL- Multi-light forward rendering with Blinn-Phong lightingSTANDARD_PBR_WGSL- Physically-based rendering with metallic-roughness workflowUNLIT_WGSL- Simple unlit rendering with vertex colorsEMISSIVE_WGSL- Self-illuminating materialsWIREFRAME_WGSL- Debug wireframe visualization
§Usage
ⓘ
use khora_lanes::shaders::LIT_FORWARD_WGSL;
use khora_core::renderer::{ShaderModuleDescriptor, ShaderSourceData};
use std::borrow::Cow;
let descriptor = ShaderModuleDescriptor {
label: Some("lit_forward"),
source: ShaderSourceData::Wgsl(Cow::Borrowed(LIT_FORWARD_WGSL)),
};Constants§
- EMISSIVE_
WGSL - Emissive material shader for self-illuminating objects.
- FORWARD_
PLUS_ WGSL - Forward+ rendering shader with tile-based light lookup.
- LIGHT_
CULLING_ WGSL - Light culling compute shader for Forward+ rendering.
- LIT_
FORWARD_ WGSL - Lit forward rendering shader with multi-light Blinn-Phong lighting.
- SHADOW_
PASS_ WGSL - Minimal depth-only shader for shadow map generation.
- STANDARD_
PBR_ WGSL - Standard PBR (Physically-Based Rendering) shader.
- UNLIT_
WGSL - Simple unlit shader for vertex-colored objects.
- WIREFRAME_
WGSL - Wireframe debug visualization shader.