Blender and Integrations
Debug and model shader uniforms
Reference the uniforms actually used by the project's debug renderer and model demo.
Verified against the project sources on 19 September 2026.
Debug shader#
jolt_debug_draw() supplies debug uniforms itself. Control normal usage through public jolt_debug_* functions. The following layout is useful when maintaining the shaders; it is an implementation contract, not a new physics API. BBMOD shaders have their own material system.
| API / field | Contract |
|---|---|
| sh_jolt_debug_3d: u_tint (vec4) | RGBA multiplier over vertex colour. |
| sh_jolt_debug_3d: u_lighting (float) | mix(1, diffuse, u_lighting): 0 unlit, 1 directional diffuse. |
| u_depth_bias (float) | Both debug shaders subtract bias × clip.w from clip.z to pull lines forward. |
| sh_jolt_debug_primitive_batch: u_instance_data[384] (vec4) | 128 instances, three vec4 each: position.xyz/scale.x; quaternion.xyzw; scale.yz/packed RGB/unused. |
| u_instance_count (float) | Active instance count. The vertex colour red channel encodes its slot; unused slots are clipped. |
Model demo#
| API / field | Contract |
|---|---|
| sh_model_demo: u_model_tint (vec4) | RGBA model tint. |
| sh_model_demo: u_use_texture (float) | Controls texture use in the model demo shader. |
New public debug flags#
| API / field | Contract |
|---|---|
| JOLT_DEBUG_SOCKETS | 2048 |
| JOLT_DEBUG_PENETRATION | 4096 |
| JOLT_DEBUG_EXPLOSIONS | 8192 |
| JOLT_DEBUG_FORCES | 16384 |
| JOLT_DEBUG_POINTS | 32768 |
| JOLT_DEBUG_SURFACES | 65536 |
| JOLT_DEBUG_ALL | 131071 |
jolt_debug_enable(true);
jolt_debug_set(JOLT_DEBUG_FORCES, true);
jolt_debug_set(JOLT_DEBUG_POINTS, true);
// Draw, after setting your existing 3D camera:
jolt_debug_draw();Enable the categories you need. Uniform uploads and debug previews do not apply forces or explode emitters. Measure performance with debugging disabled as well as enabled; the batch shader uses a repeated frozen wireframe buffer, not a separate native per-instance vertex stream.