Use CultMath HLSL mirror in Muninn tracker

This commit is contained in:
Meta Vens 2026-06-10 21:22:44 +01:00
commit c4f97fd6fd
2 changed files with 6 additions and 1 deletions

View file

@ -3,6 +3,9 @@
Muninn owns PS Move sensor stream exposure. This crate is Muninn's first native
optical marker candidate extractor: Rust owns orchestration, FFI, validation,
and the CPU mirror; the compute shader owns the parallel image reduction stage.
The shader includes CultMath's canonical HLSL mirror, so shader compilation must
add `E:\Projects\CultMath\shaders` or the packaged CultMath shader content to
the include path.
This crate deliberately stops at per-frame marker candidates. Final pose,
stereo triangulation, controller association, IMU fusion, prediction, and

View file

@ -2,6 +2,8 @@
// One thread group owns one image tile. The shader emits at most one bright
// marker candidate per 16px tile; Rust owns dispatch sizing and downstream ranking.
#include "CultMath.hlsl"
struct MoveSphereCandidate
{
uint2 sourceIdHash;
@ -83,7 +85,7 @@ void main(uint3 groupId : SV_GroupID, uint3 groupThreadId : SV_GroupThreadID)
{
float area = (float)gArea;
float tilePixels = (float)(tileSize * tileSize);
float areaScore = min(1.0, area / tilePixels);
float areaScore = cultmath_saturate(area / tilePixels);
float brightnessScore = (float)gPeak / 255.0;
MoveSphereCandidate candidate;