MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / mat_mul

Function mat_mul

tools/imposter-baker/src/render.rs:479–492  ·  view source on GitHub ↗
(a: [[f32; 4]; 4], b: [[f32; 4]; 4])

Source from the content-addressed store, hash-verified

477}
478
479fn mat_mul(a: [[f32; 4]; 4], b: [[f32; 4]; 4]) -> [[f32; 4]; 4] {
480 // Column-major: result[col][row] = sum_k a[k][row] * b[col][k]
481 let mut out = [[0.0; 4]; 4];
482 for col in 0..4 {
483 for row in 0..4 {
484 let mut s = 0.0;
485 for k in 0..4 {
486 s += a[k][row] * b[col][k];
487 }
488 out[col][row] = s;
489 }
490 }
491 out
492}
493
494// ────────────────────────────────────────────────────────────────────
495// WGSL: vertex stage shared, three fragment outputs (lambert / normal /

Callers 1

bake_asyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected