Module shaders

Module shaders 

Source
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

§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.