Create orthographic projection function

This commit is contained in:
Camden Dixie O'Brien committed 2025-10-05 13:51:13 +01:00
1 parent 6e37b45f28
commit a73975a766
3 files changed
+14 -1

No files matched your search

+3 -1
View File
@@ -64,7 +64,9 @@ int main(int argc, char *argv[])
const mat4_t view = mat4_lookat(cam, tgt, up);
const mat4_t proj = mat4_perspective((float)W / H, PI / 8, 0.1, 100.0);
const mat4_t vp = mat4_mul(proj, view);
const mat4_t light_vp = mat4_lookat(light, tgt, up);
const mat4_t light_view = mat4_lookat(light, tgt, up);
const mat4_t light_proj = mat4_orthographic(5, 5, 10);
const mat4_t light_vp = mat4_mul(light_proj, light_view);
mat4_t transforms[NELEMS(gpu_models)] = {
mat4_mul(
MAT4_TRANSLATE(1, 0, 0),