SPECIFICATION INDEX
SPEC/Pipelines/Hardware Raytracing & GPU Pipelines

Hardware Raytracing & GPU Pipelines

Integrating Solis WGSL and HLSL spectral compute shaders into real-time raster and raymarch pipelines.

Solis provides pre-built shader kernels designed for modern low-overhead graphics APIs including WebGPU, Metal, and DirectX 12.

WebGPU Compute Shader Architecture

Spectral raymarching runs as an asynchronous compute pass preceding the primary tonemapper pass:

SPECTRA // SNIPPET
struct Ray {
  origin: vec3<f32>,
  direction: vec3<f32>,
  wavelength: f32,
  energy: f32,
};

@group(0) @binding(0) var<storage, read> bvh_nodes: array<BvhNode>;
@group(0) @binding(1) var<storage, read_write> spectral_buffer: array<vec4<f32>>;

@compute @workgroup_size(16, 16)
fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
  let pixel_coord = global_id.xy;
  // Execute continuous dispersion ray bundle traversal
}