Commit graph

204 commits

Author SHA1 Message Date
marauder2k7
5a6467d54a Update mat44_impl.inl
fix matrix normalize
2026-03-05 18:55:47 +00:00
marauder2k7
5c3c0546f6 Update mPoint3.h
missed convolve and convolveInverse
2026-03-05 18:55:46 +00:00
marauder2k7
585279ae82 Update mat44_impl.inl
should use original matrix translation not the dst matrix
2026-03-05 18:55:42 +00:00
marauder2k7
caeaedde52 add inverse to
fix tests by adding an explicit inverse to function
copy 3rd row into dst it seems original was not touching this at all.
2026-03-05 18:55:41 +00:00
marauder2k7
228b474f2e Update math_backend.h
MSVC doesnt use __builtin_expect it is a GCC only flag
2026-03-05 18:55:40 +00:00
marauder2k7
0ba8d948fb neon implementation
removed some x86 intrinsic functions that were in the mat44_impl file
reinstated some mMath_C functions and mMathFn ptrs trying to diagnose an issue.
Had to come up with a different way to initialize the scalar table if the isa tables are not initialized yet. Mac did not like the static initialization.
Had to change neon over to using explicit masks for shifting, cross product was failing during bakes and matrix calculations
2026-03-05 18:55:38 +00:00
marauder2k7
bb1478a8c3 add neon mat for mac 2026-03-05 18:55:37 +00:00
marauder2k7
bc3145bc55 matrix functions
most matrix functions are converted over, no benefit to converting over the project/ortho because they would be scalar anyway but may need to move them regardless.
2026-03-05 18:55:36 +00:00
marauder2k7
67f12311d4 ISA backends float3 and float4 - cleanup history squash
working for both neon32 and neon64

Update math_backend.cpp

further sse simd additions

avx2 float3 added
added normalize_magnitude
added divide fast to float3 may copy to float4

move static spheremesh to drawSphere (initialize on first use) so platform has a chance to load the math backend

all float3 and float4 functions and isas

completed all options of float3 and float4 functions in isas and math_c
neon still to be done but that will be on mac.

Update math_backend.cpp

mac isa neon update

added float3
restructured the classes to look more like the final version of the x86 classes

linux required changes

Update build-macos-clang.yml

Update build-macos-clang.yml

Revert "Update build-macos-clang.yml"

This reverts commit 29dfc567f4.

Revert "Update build-macos-clang.yml"

This reverts commit 2abad2b4ca.

Update CMakeLists.txt

fix macs stupid build

remove god awful rolling average from frame time tracker....

use intrinsic headers instead

each isa implementation now uses a header for that isa's intrinsic functions these are then used in the impl files. This will make it easier for matrix functions when those are implemented.

fixed comment saying 256 when it should be 512 for avx512

consolidated initializers for function tables

Update neon_intrinsics.h

fixes for some neon intrinsics no idea if this is the best way to do these but they work at least

v_cross is especially messy at the moment we basically just do it as a c math function need to look into getting this done correctly
2026-03-05 18:55:34 +00:00
marauder2k7
73ed502ac9 neon float4
note: 64bit only
2026-03-05 18:55:33 +00:00
marauder2k7
9ebcee420f moar changes
mac implementation had _mm_div (x86 intrinsic)
2026-03-05 18:55:32 +00:00
marauder2k7
e9fdffc2dd math backend setup
setup libraries for different simd isa's
add float4 functions for c sse2 and avx2 (placeholder file for neon to be implemented on mac)
2026-03-05 18:55:29 +00:00
marauder2k7
f24e9f5195 Update mathTypes.cpp
TransformF can take 7 or 3 values so on false just set position for now. We may need to change ParseProperty to return a count for such cases as this and be able to tell whether its just position, rotation or both being set
2025-05-16 17:27:34 +01:00
marauder2k7
e1c01cd49a Merge remote-tracking branch 'upstream/development' into imageAsset_refactor_rev3 2025-05-12 14:45:41 +01:00
marauder2k7
0ff636e9ca Update mathTypes.cpp 2025-04-10 08:56:40 +01:00
marauder2k7
77a7847eed Update mathTypes.cpp 2025-04-10 08:56:20 +01:00
marauder2k7
fae5ebb9e8 null termination was wiping buffer 2025-04-10 08:55:42 +01:00
marauder2k7
2e64d36382 Update mathTypes.cpp
fix matrix types, should of been using columns not the rows
2025-04-10 08:13:10 +01:00
marauder2k7
cd7666bf2a rename overloaded function so linux and mac stop bitching 2025-04-09 16:05:22 +01:00
marauder2k7
7c3fbfc9d8 add getter for console get types
templated function for getting data from a field
2025-04-09 15:14:46 +01:00
marauder2k7
f30ff6734e Update mathTypes.cpp
mathtypes.cpp ConsoleSetTypes now converted
2025-04-08 10:13:48 +01:00
marauder2k7
1cb2109d6e Update mathTypes.cpp
update matrix/ang types to use the new function
change all print's to warn's
2025-04-08 09:51:38 +01:00
marauder2k7
802f90bf69 init commit
initial commit of templated ParseProperty function
TypePoint and TypeRect consoleSetTypes now use the new templated function
2025-04-08 08:16:09 +01:00
marauder2k7
eca0820134 init commit
start of attempt 3
2025-01-23 22:12:52 +00:00
marauder2k7
9af22dc302 BUG: Probe baking look at matrix was wrong
Multiple fixes in files sent by Az but matrix look at function was creating a view matrix that messed up the capture.
Look at function for matrix now returns the correct matrix and bakes looking better
2025-01-07 15:44:19 +00:00
marauder2k7
ef9d33bc68 Update mPoint4.h 2024-12-09 18:08:54 +00:00
marauder2k7
80bd8f8117 some enchancements for shadowmapping
new /= operator in point4f
_calcClipSpaceAABB in pssm no longer uses radius just transform points into light space and do min max
_roundProjection matrix also optimized.
2024-12-09 17:54:48 +00:00
marauder2k7
a92b9d0e2d code review with az
changes per review, frustum wasnt dirty... i like it dirty
2024-12-05 00:17:44 +00:00
marauder2k7
f288ffccba cubemap baking fix
the key part of this issue was to invert the order we were baking the faces. Not much of a fix but it works better than before need to get a proper fix implement
the way the issue is copying X+ into every other face but isnt doing it in the reverse order means the rtv for face 0 must be being replicated into all other faces.
2024-12-04 21:57:32 +00:00
marauder2k7
b72b7882c2 unit test improved precision
change matrix unit tests to use POINT_EPSILON macro for testing precision
remove old matrix test class, was not used anyway
2024-08-01 05:04:13 +01:00
marauder2k7
699fa5ef77 Update mMatrix.h
invertTo should always just be const
return loop to * operator, explicit will not allow for scaling of rows and cols
2024-08-01 03:33:07 +01:00
marauder2k7
b5e729c179 Update mMatrix.h
add default destructor
2024-07-31 19:02:23 +01:00
marauder2k7
219792cc30 Update mMatrix.h
returning identity no longer necessary as fullinverse is its own algo
2024-07-31 18:54:22 +01:00
marauder2k7
165a2bea01 fix
fix invertTo function
unitTest to make sure matrix calling invertTo does not get changed.
reimplemented gauss jordan.
2024-07-31 18:52:18 +01:00
marauder2k7
ab4b4cbf96 cramer for inverse
added #if block around inverse methods to track down shadow bug

uses old inverse method as default for now.
2024-07-31 17:32:00 +01:00
marauder2k7
4078f3ad4e inverse fixes
further tests showed issues with inverse function, now to better match what was originally happening, the inverse only happens on the 3x3 portion of the matrix and translation is handled separately.

Frustum test now uses more real world examples of a projection matrix. Test for the full unproject stack of math to test its result as unproject was where the issue about inverse originated
2024-07-30 17:54:16 +01:00
marauder2k7
f96e044d89 unit tests and fixes
implemented the rest of the tests
euler single dimension angle tests now pass, missed 1.0f in z
2024-07-30 13:00:32 +01:00
marauder2k7
d03851958d more fixes
more unit tests revealed more discrepancies fixes applied.
2024-07-30 08:30:42 +01:00
marauder2k7
a5de2d9add tests
added more unit tests to match values between templated and matrix

tests showed discrepancies in affineInverse, fixed the function to return what is expected.
2024-07-30 07:20:57 +01:00
marauder2k7
8c19f6d8ca inverse function
fixed inverse function, was not returning correctly.
2024-07-29 21:50:33 +01:00
marauder2k7
54bb31c8bc Update mMatrix.h
bracket lines
change functions to match mmath_c to figure out where the issue is.
2024-07-29 17:24:23 +01:00
marauder2k7
75c5a0919b Update mMatrix.h
silence issues from macos clang
2024-07-29 16:39:08 +01:00
marauder2k7
2fa15191ae Update mMatrix.h
most working example
2024-07-28 20:40:26 +01:00
marauder2k7
504b549ac0 Update mMatrix.h 2024-07-28 19:38:02 +01:00
marauder2k7
c61d36b799 closest
backup closest working example, no errors or warnings from compile, matrices arent correct though yet.
2024-07-28 19:36:07 +01:00
marauder2k7
888332a85c rest of the implementation
apparently templated classes need all functions to be inline, otherwise unresolved symbols
macro for switching between matrixf and templated
few functions that were missed
2024-07-28 14:35:34 +01:00
marauder2k7
8f8cc32636 normalize and affineInverse
added functions for normalize and affineInverse
2024-07-28 11:54:44 +01:00
marauder2k7
2cee5f7e10 mul and operators
add mul functions and operators
code conformity changes
2024-07-28 09:02:49 +01:00
marauder2k7
02b5e85f61 implement struct example 2024-07-28 07:04:23 +01:00
marauder2k7
c0bcb8bd00 Update mMatrix.cpp
fix comment, torque is already column major, even though doc says its row major
2024-07-28 06:38:11 +01:00