michaelg
1bce62c371
Add function glm_perspective_lh_zo
...
This commit adds the function `glm_perspective_lh_zo`, modelled on the
implementation of glm_perspective, but amended to provide a left-hand
coordinate system expected by DirectX, Metal and Vulkan (per the GLM
project's `glm/detail/setup.hpp`). It uses a clip-space of zero-to-one.
The function is tested against a longhand version of the algorithm it
seeks to implement as well as against the output of the GLM project's
`glm::perspectiveLH_ZO` function. This commit adds a new subdirectory
`test/glm_cmp` which contains a basic CMake file and `main.cpp`. An
interested user should link or copy or clone the GLM project into this
directory. The `main` function can be used to print the reference data
used so others can verify behaviour in the future, or add new literal
reference values.
2021-05-13 23:18:05 +02:00
Recep Aslantas
a242d83805
style: rename nearVal, farVal to nearZ and farZ
2021-05-08 22:42:44 +03:00
Recep Aslantas
607182982d
Merge branch 'master' into simd-3
2021-05-07 14:08:56 +03:00
Sundaram Ramaswamy
9665be3138
Add struct API wrapper
2021-05-07 13:49:44 +05:30
Recep Aslantas
5c22ca3abb
arrm, neon: use negate instruction instead of xor in glm_inv_tr_neon()
2021-05-07 01:52:12 +03:00
Recep Aslantas
7f9585ca72
arrm, neon: impove hadd performance
2021-05-07 01:46:24 +03:00
Recep Aslantas
d0ab3aaa2e
arm, neon: util macros
2021-05-07 01:46:03 +03:00
Sundaram Ramaswamy
8ce45b4303
Add call and struct interfaces
2021-05-07 00:35:20 +05:30
Sundaram Ramaswamy
f19ff5d064
Use scale for both cases
2021-05-06 23:47:03 +05:30
Sundaram Ramaswamy
d6b93f052e
Add nlerp for quaternions
...
Normalized linear interpolation for quaterions are a cheaper
alternative to slerp. This PR adds nlerp operaiton for quaternions.
2021-05-06 23:38:26 +05:30
Recep Aslantas
28705be5a3
simd, sse: reduce some computation at glm_mul_rot_sse2()
2021-05-01 23:16:03 +03:00
Recep Aslantas
e1b142bce7
add todo to quat.h
2021-05-01 23:03:41 +03:00
Recep Aslantas
0f96eaad20
sse2: optimize glm_mat3_mul_sse2() with sse2
...
* reduce memory access for dest[2][2]
* the speed is increased ;)
2021-05-01 22:55:19 +03:00
winter091
13269f4af8
fix typo: vec3 -> vec4
2021-05-01 16:48:31 +03:00
Recep Aslantas
faf6186c29
sse: optimize glm_mat2_mul_sse2 with sse
2021-05-01 03:44:04 +03:00
Recep Aslantas
2be6ac949b
sse: optimize glm_quat_mul with sse
2021-05-01 03:18:26 +03:00
Recep Aslantas
5b7bc522ac
sse: optimize affine with sse
...
* re-oder instructions for ILP
2021-05-01 02:58:14 +03:00
Recep Aslantas
376cf31ee7
armi neon: optimize affine with neon
2021-05-01 02:46:14 +03:00
Recep Aslantas
d28b381dd6
armi neon: optimize mat4 mul with neon
2021-05-01 02:45:15 +03:00
Recep Aslantas
3673622cc3
simd, sse: optimize mat4 mul-v with sse
...
* re-oder instructions for ILP
2021-05-01 02:17:34 +03:00
Recep Aslantas
a90f706e12
simd, sse: optimize mat4 mul with sse
...
* re-oder instructions for ILP
2021-05-01 02:17:08 +03:00
Recep Aslantas
c065d71a2f
simd, sse: optimize mat4 inv with sse
...
* reduce a few shufflees
* re-oder instructions for ILP
2021-04-30 21:12:17 +03:00
Recep Aslantas
ba634d6c83
simd: optimize glm_mat4_zero() with simd
2021-04-30 04:04:27 +03:00
Recep Aslantas
f35badd436
now working on v0.8.3
2021-04-30 01:00:42 +03:00
Recep Aslantas
04eaf9c535
arm, neon: neon/fma support for glm_quat_mul()
2021-04-29 01:12:00 +03:00
Recep Aslantas
4e4bff418d
arm, neon: neon/fma support for glm_mat2_mul()
2021-04-28 22:06:46 +03:00
Recep Aslantas
55ebbdbe40
arm, neon: neon/fma support for glm_inv_tr()
2021-04-28 14:46:14 +03:00
Recep Aslantas
155eb109a8
arm, neon: neon/fma support for glm_mul_rot()
2021-04-25 03:49:35 +03:00
Recep Aslantas
2903813765
arm, neon: neon/fma support for glm_mul()
2021-04-25 03:45:00 +03:00
Recep Aslantas
0ab50f7208
arm, neon: update mat4_mul to use FMA
2021-04-25 03:41:39 +03:00
Recep Aslantas
701e015bfd
avoid loading vec3 by glmm_load()
...
* use glmm_set1() for each for now
2021-04-25 02:36:06 +03:00
Recep Aslantas
1fb941a41b
drop swizzling helpers fro now for simplicity
2021-04-25 02:35:55 +03:00
Recep Aslantas
92151c6328
arm, neon: use div instead of mul by 1 / det for mat4_inv
2021-04-24 18:02:47 +03:00
Recep Aslantas
afac887850
arm, neon: implement mat4 inv with neon
2021-04-24 17:54:01 +03:00
Recep Aslantas
a111693b6b
arm, neon: implement mat4 determinant with neon
2021-04-24 15:45:36 +03:00
Recep Aslantas
ce9e5f5575
arm: update glmm swizzling func names
2021-04-24 01:38:04 +03:00
Recep Aslantas
d13842e7de
arm: optimize vec4 div with NEON
2021-04-24 00:51:09 +03:00
Recep Aslantas
059e5010e6
arm: define CGLM_ARM64 for identify arm64
2021-04-24 00:44:07 +03:00
Recep Aslantas
65292a94a6
swizzling functions for NEON
2021-04-24 00:00:00 +03:00
Recep Aslantas
f303984aad
use unified glmm api for vec4
2021-04-23 23:34:36 +03:00
Recep Aslantas
7d5c4da7cf
optimize translate functions
2021-04-23 23:32:48 +03:00
Recep Aslantas
63988a515c
glmm: new defines for splat
2021-04-23 23:32:21 +03:00
Recep Aslantas
9725b60d46
rename glmm_shuff1x() to glmm_splat()
...
* mark glmm_shuff1x() as DEPRECATED
2021-04-23 22:12:57 +03:00
Recep Aslantas
f14ca0c3f2
now working on v0.8.2
2021-04-23 17:03:39 +03:00
Recep Aslantas
2de1133012
fix enabling FMA macro for MSVC
2021-04-19 06:04:22 +03:00
Recep Aslantas
ebba4eea8e
win, msvc: enable FMA macro for MSVC
2021-04-19 04:14:14 +03:00
Recep Aslantas
aa2fa89e6c
arm: fma msub and nmsub
2021-04-19 00:35:19 +03:00
Recep Aslantas
7b0eee497e
arm: fix fmadd parameter order
2021-04-19 00:28:07 +03:00
Recep Aslantas
04008d9c3f
arm: fix fma for glm_vec4_muladds
2021-04-19 00:21:04 +03:00
Recep Aslantas
11b1588105
glmm: missing FMA funcs for SSE and AVX
2021-04-19 00:20:47 +03:00