Tony Wasserka
d09b9fa6a1
Math3D: Change the vector swizzlers to return const objects.
...
Otherwise, people might be tempted to do things like "some_vec4.xyz() = some_vec3", which compiles fine but does not do the expected thing because xyz() does not return references.
2014-08-17 18:39:02 +02:00
Unknown W. Brackets
56b83af1f0
Don't use aligned loads in non-inlined funcs.
...
I'm wanting things to stay in registers, but that's not realistic for
arguments. Force inline the others. May help #5699 .
2014-03-23 12:09:17 -07:00
Henrik Rydgard
bc121242b3
Use fast_math matrix multiplication for culling and sw transform
2014-03-22 14:40:09 +01:00
Unknown W. Brackets
a8a299c2e3
Fix ToRGB/ToRGBA possible accuracy loss.
...
It was always like this, but not used as much before. Shifts are fast and
it eneds to sum anyway, there should not be any benefit to multiplying as
floats, and it will probably lose accuracy.
2014-03-18 22:56:27 -07:00
Unknown W. Brackets
416df17088
Inline From/ToRGB(A) to avoid losing SSE.
...
Otherwise it has to store it, which I'd like to avoid.
2014-03-17 23:03:04 -07:00
Unknown W. Brackets
6630e45eff
Just add a packed version of Vec3f.
...
This way we can have it aligned to memory where needed. I think it'd be
better to avoid this if possible so that we can actually vectorize
spline/etc. code.
Fixes #5673 .
2014-03-17 06:59:40 -07:00
Unknown W. Brackets
dd140b73bb
softgpu: Use SSE for gouraud shading.
2014-03-16 14:29:22 -07:00
Unknown W. Brackets
473fb866e6
softgpu: Implement vertex preview.
...
And move ConvertMatrix4x3To4x4() into a common place since there were
differing implementations, which was only confusing.
2013-12-29 13:45:10 -08:00
Unknown W. Brackets
2f0c8c2877
softgpu: Attempt to implement GE_PROJMAP_UV.
...
Looks okay, not sure if it's fully correct.
2013-12-15 11:59:22 -08:00
Unknown W. Brackets
dfadb67ea1
Avoid some operator overloads.
...
Causing ambiguity.
2013-11-17 14:42:58 -08:00
Unknown W. Brackets
a3bd2f1365
Fix Vec3ByMatrix44() and use it for matrix math.
2013-11-17 14:10:57 -08:00
Unknown W. Brackets
b541c81ba3
Clean up Mat3x3 etc. constness.
2013-11-17 13:27:51 -08:00
Henrik Rydgard
8a69543ec4
BBOX: Transform the planes by the matrix so we don't need to transform the box
2013-11-14 11:44:13 +01:00
Unknown W. Brackets
eae6e87620
Simplify lighting clamping in softgpu.
2013-10-05 13:05:32 -07:00
Henrik Rydgard
bd8cb4b02d
Start work on implementing bbox, add a comment with some thoughts..
2013-09-24 14:14:05 +02:00
neobrain
2228ff1cd0
GPU/Math3D: Add a 4x4 matrix class.
2013-07-29 22:49:19 +02:00
neobrain
9f73789c22
GPU/Math3D: Add a 3x3 matrix class.
2013-07-29 22:26:42 +02:00
neobrain
d3e33c527e
GPU/Math3D: Replace VecX::Lerp methods with more general and clearer Lerp and LerpInt template functions.
2013-07-29 22:26:42 +02:00
neobrain
f080abc9e9
GPU/Math3D: Add methods for casting vectors.
2013-07-29 22:26:42 +02:00
neobrain
4ab080d083
GPU/Math3D: Support converting Vec3 and Vec4 objects to u32 color values.
2013-07-29 22:26:42 +02:00
neobrain
97f4318ce5
GPU/Math3D: Rename VecXRef::Mul to the star operator.
2013-07-29 22:26:42 +02:00
neobrain
878550ec68
GPU/Math3D: Add component swizzlers for Vec2, Vec3 and Vec4.
2013-07-29 22:26:42 +02:00
neobrain
45d1645c6a
GPU/Math3D: Add a Vec2 class.
2013-07-29 22:26:42 +02:00
neobrain
9a5958d353
GPU/Math3D: Add a Vec4 class.
2013-07-29 22:26:41 +02:00
neobrain
6926926267
GPU/Math3D: Change Vec3 to allow for arbitrary component base types.
2013-07-29 22:26:41 +02:00
neobrain
0ed6e93b22
GPU/Math3D: Replace ambiguous Vec3 constructors with static methods returning a new Vec3 object.
...
Possibly fixes a bug or two because the old code was using the constructors incorrectly.
2013-07-29 22:26:41 +02:00
neobrain
c502429c8f
GPU/Math3D: Add some getter functions to allow indexing Vec3 objects like colors or texture coordinates.
...
GPU/Math3D: Replace Vec3::v array with a method called "AsArray".
2013-07-29 22:26:41 +02:00
neobrain
17759082dc
GPU/Math3D: Replace * and % operators with the less ambiguous function names Dot and Cross.
2013-07-29 22:26:41 +02:00
Henrik Rydgard
cc58e34cf8
Remove legacy key mapping and associate devices with keys (DInput has been left behind for now, will be fixed up soon). Saving is broken, will be fixed soon.
2013-07-06 20:45:44 +02:00
King_DuckZ
61500281a9
Warning fix on Intel compiler.
2013-05-30 15:42:11 +02:00
King_DuckZ
1455452850
Trailing whitespaces removed.
2013-05-30 15:42:11 +02:00
Henrik Rydgard
5f1ed03165
Revert "Merge pull request #1324 from cinaera/pullreq" as it seems to break stuff, needs more testing.
...
This reverts commit a265569928
, reversing
changes made to 06999ae649
.
2013-04-21 21:09:02 +02:00
BeaR
9027e5018b
Handle zero-length vectors when normalizing
2013-04-18 17:36:20 +02:00
Henrik Rydgard
64cc573703
Switch to "GPL 2.0 or later" for various reasons. I wrote most of the code I imported from Dolphin (which is GPL2-but-not-later), so it should be OK.
2012-11-04 23:24:00 +01:00
Henrik Rydgard
4f7ad15758
Add snapshot of the whole source code.
2012-11-01 16:19:01 +01:00