Commit graph

122 commits

Author SHA1 Message Date
Unknown W. Brackets
ce8a49b1c1 softgpu: Retain floats in diffuse/specular.
This seems to be a bit more accurate.  Color blending seems correct now,
but the factors and especially pow results are off.

Also, normalize normal to 0, 0, 1, which seems to match results better.
2022-01-06 21:52:31 -08:00
Unknown W. Brackets
079b67e7ed softgpu: Use common SIMD matrix multiplies. 2022-01-06 21:19:47 -08:00
Unknown W. Brackets
cba2374abd softgpu: Separate calculation of S/T.
We could probably reuse, but we're not right now and it complicates the
logic.
2022-01-06 21:19:47 -08:00
Unknown W. Brackets
e4673a5fa4 softgpu: Separately profile verts and lighting. 2022-01-02 13:46:11 -08:00
Unknown W. Brackets
2ab7499d8d softgpu: Combine sliced rectangles.
This mostly affects clears, and reduces overhead.  Only about 2%
improvement, but it's a small change.
2021-11-14 18:31:46 -08:00
Unknown W. Brackets
0281e2f017 softgpu: Split out rectangle path for combining. 2021-11-14 18:31:46 -08:00
Unknown W. Brackets
9545e3b0e2 softgpu: Fixup range cull for fans and fast path. 2021-11-14 18:31:45 -08:00
Unknown W. Brackets
fb6fadbbb7 softgpu: Fast path rectangles as fans.
Some games, such as Legend of Heroes III, use fans instead of strips.
2021-11-14 18:31:45 -08:00
Unknown W. Brackets
5bb6245b1f softgpu: Fix leaked range flag on cull.
Fixes some backgrounds in Final Fantasy 4, probably others.
2021-11-14 08:43:52 -08:00
Unknown W. Brackets
0b73c1ce83 softgpu: Correct guardband cull behavior.
Culling is based on whether clipping happens, not whether clamping
happens.  This is important for issues like #12348.
2021-09-09 20:05:41 -07:00
Unknown W. Brackets
2f63f9999d GPU: Normalize 0 to 1 always in software lighting.
See #14167.  This seems to be consistent.
2021-02-27 23:51:45 -08:00
aliaspider
9a3e5879bb Global: Correct many endian types and casts. 2021-02-18 22:25:24 -08:00
Henrik Rydgård
9e41fafd0d Move math and some file and data conversion files out from native to Common.
Buildfixing

Move some file util files

Buildfix

Move KeyMap.cpp/h to Core where they belong better.

libretro buildfix attempt

Move ini_file

More buildfixes
2020-10-04 09:12:46 +02:00
Henrik Rydgård
1b3413945b Some header include cleanup 2020-09-16 09:20:41 +02:00
Henrik Rydgård
c5e0b799d9 Remove category from _assert_msg_ functions. We don't filter these by category anyway.
Fixes the inconsistency where we _assert_ didn't take a category but
_assert_msg_ did.
2020-07-19 20:33:25 +02:00
Henrik Rydgård
970adfbcc9 Isolate most of the softgpu specialization code to RasterizerRectangle.
See comments.
2019-10-28 09:33:30 +01:00
Henrik Rydgård
c7f6724f7e Detect sprite drawing (1:1 texture mapping), run a simpler function without the triangle state tracking.
This will allow further simplification and specialization.
2019-10-27 20:54:36 +01:00
Henrik Rydgård
510229b68b SoftGPU: Detect through-mode rectangles from triangle strips 2019-10-27 20:54:36 +01:00
Henrik Rydgård
b2e1e3c84d
Merge pull request #11675 from unknownbrackets/softgpu
SoftGPU: Respect stencil write mask on test fail
2018-12-17 00:08:43 +01:00
Unknown W. Brackets
aa3b026bfe SoftGPU: Fix crash on garbage index data. 2018-12-16 13:16:05 -08:00
Unknown W. Brackets
8a7ec4fc19 GPU: Fix curve breakage due to cull flipping. 2018-12-16 13:00:36 -08:00
Unknown W. Brackets
3c5455f85b SoftGPU: Calculate texcoords in transform.
No need to do it in rasterization, and should be faster to do it on the
verts, anyway.  This fixes the software issue of #11595, presumably
because of the w handling.
2018-11-25 19:19:11 -08:00
Unknown W. Brackets
529efded1c GE Debugger: Fix display of raw normals. 2018-11-22 17:53:36 -08:00
Unknown W. Brackets
11a8857a7e SoftGPU: Correct clipping for flat shading.
It needs to use the provoking color, regardless of culling or clipping.

Fixes Blade Dancer lighting (see #4140.)
2018-11-22 17:48:55 -08:00
xebra
eca9386c05 [spline/bezier]Reduce static buffers. Get rid of the spline buffer using half of the vertex buffer. 2018-10-07 23:54:31 +09:00
xebra
15a11d58c9 Modify IndexConverter class to functor. 2018-10-07 23:53:40 +09:00
Unknown W. Brackets
797327eecd GPU: Handle bad fog params as large signed vals.
From tests, it seems they're just treated as valid exponents.

Using 65535 since that's the range of depth, can't think of a game using a
larger value for a fog parameter, probably never even this large.
2018-09-10 00:28:02 -07:00
Unknown W. Brackets
a4c0640f01 GE Debugger: Factor out host calls some.
Moving more of this to cross platform for the web debugger.
2018-09-01 08:32:03 -07:00
Unknown W. Brackets
06ad9b829f SoftGPU: Oops, correct rounding to make sense.
Was too hasty in that last commit.
2018-08-09 07:13:42 -07:00
Unknown W. Brackets
31d5c39858 SoftGPU: Fix some minor rounding on viewport cull.
Had some tests failing when on the edge due to this.
2018-08-05 20:07:45 -07:00
Unknown W. Brackets
cd6b1f73c1 SoftGPU: Drop verts only when depth not clamped.
Depth clamping bypasses the 4096x4096 box check.
2018-08-05 17:17:55 -07:00
Unknown W. Brackets
77f0499f7f GPU: Rename clipping flag to depth clamp.
It seems to just to depth clamp.  When depth clamp happens, it affects
clipping a little, but only for vertices that needed clamping.
2018-08-05 17:11:51 -07:00
Henrik Rydgård
36fd2711d6 Revert "Remove further remains of hardware skinning."
This reverts commit 40db61a680.
2018-04-10 12:22:41 +02:00
Henrik Rydgård
4cf5999bc8 Move the vertTypeID calculation out of DrawEngine. Need to shorten SubmitPrim as much as possible. 2018-03-05 12:28:10 +01:00
Henrik Rydgård
40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Unknown W. Brackets
b94ca6e75e Vulkan: Use depth clamping, where available.
This fixes, for example, Shadow of Destiny, even without the hack.
2017-12-26 16:54:39 -08:00
Unknown W. Brackets
a6f56769a8 SoftGPU: Avoid some compile warnings.
Remove some no-longer used funcs, add some switch default logs.
2017-06-06 19:49:42 -07:00
Henrik Rydgård
8f9e0b7fcc SoftGPU: Make sure transformunit.buf is properly aligned. Helps part of #9718 2017-05-24 10:20:10 +02:00
Unknown W. Brackets
8187927b9d SoftGPU: Use vertexjit for submitted primitives.
This uses the standard cache other rendering uses.

In Legend of Heroes 3, for example, this provides a 10% speed improvement.
2017-05-20 20:22:35 -07:00
Henrik Rydgård
d13fdfbf37 Merge pull request #9683 from unknownbrackets/ge-debugger
Minor GE debugger fixes
2017-05-15 00:02:19 +02:00
Unknown W. Brackets
94c138fd83 SoftGPU: Fix texture vertex preview in debugger. 2017-05-14 14:56:23 -07:00
Unknown W. Brackets
01076dd959 SoftGPU: Don't wrap negative positions.
Haven't fully verified this, but without this, Gods Eater Burst's bloom
doesn't work, since -1,-1 maps to 1023,1023 so everything is clipped.
2017-05-13 17:28:38 -07:00
Unknown W. Brackets
b2d3058386 SoftGPU: Correct fog for rectangles.
Gods Eater Burst uses fog in its bloom, with rectangles.
2017-05-13 17:27:34 -07:00
Unknown W. Brackets
1a56466865 SoftGPU: Match GLES lighting better, use floats.
Using floats simplifies things and also makes it faster.
2017-05-13 12:54:18 -07:00
Unknown W. Brackets
37a4d1308f SoftGPU: Round screencoords.
It seems like this is what the PSP does, or maybe this is just correcting
for floating point error...
2017-05-08 06:50:25 -07:00
Unknown W. Brackets
4f6b9c1fd2 Arg, gcc buildfix. 2017-04-29 23:53:22 -07:00
Unknown W. Brackets
1666586869 SoftGPU: Implement CONTINUE prim type.
Matches tests (except 3D lines, which aren't implemented yet.)
2017-04-29 20:36:36 -07:00
Unknown W. Brackets
1e78642a7b SoftGPU: Remove old spline handling code. 2017-04-15 21:10:19 -07:00
Unknown W. Brackets
ede9025447 SoftGPU: Simplify index conversion. 2017-04-15 21:01:17 -07:00
Unknown W. Brackets
65439b8e96 SoftGPU: Fix indices starting after 0.
We decode to 0, so we need to offset.
2017-04-15 20:49:49 -07:00