Expand description
Built-in compute kernels as embedded GLSL source strings.
Each kernel is a fully implemented GLSL compute shader. The Rust side
provides parameter structs and convenience methods to compile and dispatch
each kernel through the dispatch module.
Kernels:
- particle_integrate — position += velocity * dt, apply forces, age, kill dead
- particle_emit — atomic counter for birth, initialize from emitter params
- force_field_sample — evaluate multiple force fields at particle positions
- math_function_gpu — Lorenz attractor, Mandelbrot iteration, Julia set
- fluid_diffuse — Jacobi iteration for diffusion
- histogram_equalize — compute histogram and equalize
- prefix_sum — Blelloch parallel prefix sum (scan)
- radix_sort — GPU radix sort
- frustum_cull — per-instance frustum culling
- skinning — bone matrix palette skinning
Structs§
- Fluid
Diffuse Params - Parameters for the fluid diffusion kernel (Jacobi iteration).
- Force
Field Desc - Describes a force field for the force_field_sample kernel.
- Frustum
Cull Params - Parameters for frustum culling.
- Histogram
Params - Parameters for histogram equalization.
- Kernel
Library - Library of all built-in compute kernels, providing easy access to sources and parameter setup.
- Particle
Emit Params - Parameters for the particle emission kernel.
- Particle
Integrate Params - Parameters for the particle integration kernel.
- Prefix
SumPlan - Plan for prefix sum (Blelloch algorithm).
- Radix
Sort Plan - Plan for radix sort.
- Skinning
Params - Parameters for skeletal skinning.
Enums§
- Force
Field Type - Types of force fields.
- Kernel
Id - Identifies a built-in kernel.
- Math
Function Type - Math function types for the math_function_gpu kernel.
Constants§
- KERNEL_
FLUID_ DIFFUSE - Fluid diffusion kernel using Jacobi iteration.
- KERNEL_
FORCE_ FIELD_ SAMPLE - Force field sampling kernel: evaluate multiple force fields at particle positions.
- KERNEL_
FRUSTUM_ CULL - Frustum culling kernel: per-instance visibility testing.
- KERNEL_
HISTOGRAM_ EQUALIZE - Histogram equalization kernel (two passes: histogram + equalize).
- KERNEL_
MATH_ FUNCTION_ GPU - Math function GPU kernel: Lorenz, Mandelbrot, Julia, Rossler, Aizawa.
- KERNEL_
PARTICLE_ EMIT - Particle emission kernel: spawn new particles using atomic counter.
- KERNEL_
PARTICLE_ INTEGRATE - Particle integration kernel: advance positions, apply forces, age, kill dead.
- KERNEL_
PREFIX_ SUM - Blelloch parallel prefix sum (exclusive scan).
- KERNEL_
RADIX_ SORT - GPU radix sort kernel.
- KERNEL_
SKINNING - Skeletal skinning kernel: apply bone matrix palette transforms.
Functions§
- set_
fluid_ diffuse_ uniforms - Set uniforms for the fluid diffusion kernel.
- set_
force_ field_ uniforms - Set uniforms for the force field sampling kernel.
- set_
frustum_ cull_ uniforms - Set uniforms for the frustum culling kernel.
- set_
histogram_ uniforms - Set uniforms for the histogram equalization kernel.
- set_
math_ function_ uniforms - Set uniforms for the math function GPU kernel.
- set_
particle_ emit_ uniforms - Set uniforms for the particle emission kernel.
- set_
particle_ integrate_ uniforms - Set uniforms for the particle integration kernel.
- set_
prefix_ sum_ uniforms - Set uniforms for the prefix sum kernel.
- set_
radix_ sort_ uniforms - Set uniforms for the radix sort kernel.
- set_
skinning_ uniforms - Set uniforms for the skinning kernel.