Henrik Rydgård
118e927b86
GPU: Only GL uses a flipped buffer in non-buffered, reflect that in the SW transform code.
2020-01-26 15:54:51 +01:00
Unknown W. Brackets
c5b844cc98
GPU: Respect stencil write mask on clear.
...
Actually identified this for the softgpu in #11319 , but applying it for
RGBA is a problem in most renderers. Forgot to at least apply it to
stencil.
Fixes #11901 .
2019-03-16 19:42:18 -07:00
Unknown W. Brackets
b955ec70c9
GPU: Correct depth clamp range in range cull.
...
It was just wrong before, causing wrong culling when using a non-standard
viewport scale/center for depth.
Fixes #11701 , fixes #11781 .
2019-02-10 09:58:01 -08:00
Unknown W. Brackets
cd6783fa0d
GPU: Use provoking normal for lighting with flat.
...
This might interact strangely with skinning of texture matrix mapping, but
they're not likely to be used together.
2018-11-22 17:52:14 -08:00
Unknown W. Brackets
b2d60cb807
SoftGPU: Cleanup lighting code a bit.
...
Avoid using Length() when Length2() is enough, simplify some things.
2018-11-18 07:28:03 -08:00
Unknown W. Brackets
0c5c776bb9
GPU: Correct shade mapping with 0,0,0 light pos.
...
May need to audit more normalize() usage, if it's consistent in other
places.
2018-11-17 18:33:07 -08:00
Unknown W. Brackets
6600896312
GPU: Fix shade mapping in soft transform.
...
Was using invalid values when lighting was off.
2018-11-17 18:05:32 -08: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
dca159c47e
GPU: Correct sw flat shading color on Vulkan/D3D.
...
It was only correct on GLES before. This only fixes software transform.
2018-06-06 05:53:50 -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
40db61a680
Remove further remains of hardware skinning. Fixes #10661
2018-03-05 00:03:47 +01:00
Unknown W. Brackets
f9750dd137
Display: Avoid limiting FPS without a clear.
...
A bit of a dirty heuristic to avoid the slowdown in #8538 .
2017-12-26 19:37:40 -08:00
Henrik Rydgård
734d9c494c
Fix bug in Vulkan non-buffered where clears could extend outside the frame, since Vulkan clears do not respect scissors.
2017-12-02 11:05:10 +01:00
Henrik Rydgård
3e011238c5
Fix minor discrepancy in shader ID calculation, I don't think this will fix anything though. Bumping shader cache version and doing minor cleanup too.
2017-11-30 22:44:39 +01:00
Henrik Rydgård
2c86217552
Cleanup GPU vendor detection a bit, use it to avoid the issue mentioned in #9545
2017-11-21 16:19:28 +01:00
Henrik Rydgård
17d624d311
Ditch a silly vertex count limit that only makes sense for GLES, so move it there.
2017-11-10 15:59:36 +01:00
Henrik Rydgård
9e35144b96
Remove/deprecate GPU tick sync
2017-11-05 23:21:53 +01:00
Henrik Rydgård
4f2fb10347
Further D3D11 fixes
2017-02-12 16:14:14 +01:00
Henrik Rydgard
5ee3b534ed
More D3D11 improvements
2017-02-10 10:26:18 +01:00
Henrik Rydgard
9d7983eee8
Remove the ability to turn off prescaleUV entirely. It's simply better to do it in the vertex decoder.
2016-12-20 13:27:44 +01:00
Unknown W. Brackets
915ff42a9a
Detect clears even when outside scissor.
...
Verified that scissor affects clears as well. This allows a clear to be
detected in Katamari Damacy.
2016-05-19 20:37:29 -07:00
Unknown W. Brackets
2461a849f9
Correct some warnings reported by clang.
2016-03-20 23:13:28 -07:00
Unknown W. Brackets
f289e8485d
Vulkan: Make sure depth==stencil when clearing.
...
We have to clear both at the same time. I think it makes sense to
consider this part of the "separate alpha" flag, since alpha has to match
both color and depth.
2016-03-20 19:31:02 +01:00
Unknown W. Brackets
8efbcf8d42
Use draws for alpha/stencil only clear in Vulkan.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
9d8d810395
Clear detection: Don't need to check the even vertices, as the odd vertices are the ones used for color.
...
This lets us detect and replace cube.elf's clear, and probably others.
2016-03-06 11:36:32 -08:00
Unknown W. Brackets
d1b3768e49
Use a common func everywhere for float depth vals.
2016-01-18 19:29:45 -08:00
Unknown W. Brackets
7bfe100b0f
Fix some unused variable warnings.
...
The CheckAlpha one looks like it will matter.
2015-11-25 16:11:53 -08:00
Henrik Rydgard
aac0cd3227
Minor consistency improvement between d3d and opengl code
2015-11-05 00:08:48 +01:00
Henrik Rydgard
099f62b503
Fix some typos in D3D9 blits (removed parameter).
...
Add some missing projection matrix flips (flipped viewport emulation)
Fix issue with DrawPixels in non-buffered in D3D9
2015-11-02 20:11:48 +01:00
Henrik Rydgard
c1db771056
Fix non-through rectangles
2015-11-02 20:08:11 +01:00
Henrik Rydgard
f4248cb550
Remove a whole lot of flipping special cases
2015-11-02 20:07:30 +01:00
Unknown W. Brackets
400b8886e6
Use the framebuf->height for offset calculation.
...
This way if we shrunk the framebuffer, it'll still work.
2015-09-23 23:59:39 -07:00
Henrik Rydgard
9e18fb7e90
Round Z in the vertex shader to match a 16-bit Z buffer.
...
However this inexplicably does still not solve the Phantasy Star issue!
2015-08-26 15:25:21 +02:00
Henrik Rydgard
53f062b7b2
refactor: Remove some uses of gstate from SplineCommon and a fex texcache functions
2015-07-29 11:40:45 +02:00
Henrik Rydgard
5d0d67140f
Reverse Y when checking for rotated rects in Direct3D 9. Fixes #7738 .
2015-05-12 20:01:04 +02:00
Unknown W. Brackets
b782165b6a
Avoid some division.
2015-05-10 14:39:38 -07:00
Unknown W. Brackets
a090b5853f
Process UV rotation even in full transform.
2015-05-10 14:17:20 -07:00
Unknown W. Brackets
39cb74a8d3
Simplify transform in throughmode/sw (rectangles.)
...
This should make it a bit faster, a bit less work.
2015-03-08 13:12:13 -07:00
Peter Tissen
6f2962e0c3
make sure all the counters are increased by the correct value
2015-02-02 22:30:47 +01:00
Peter Tissen
4a150bead7
don't try to access past the number of vertices when drawing rectangles
2015-02-02 22:08:33 +01:00
Henrik Rydgard
f55e0abc93
Experiment, trying to fix #7336 : Make sure that a clear is the very first thing to happen in a frame.
...
Also a minor warning fix.
2015-01-26 00:25:48 +01:00
Henrik Rydgard
c2500744e1
D3D9 rectangle rendering fix (maxindex)
2015-01-15 23:58:07 +01:00
Unknown W. Brackets
d663cda2de
Transform rects using indices.
...
Not a hge difference. Minor cleanup.
2015-01-15 12:26:35 -08:00
Unknown W. Brackets
5cea64316a
Avoid using an offset framebuffer for large tex.
...
When texturing from the entire 512 height of a framebuffer, we still
should not trigger the offset framebuffer code. This is expected to help
Danball Senki BOOST but not break Breath of Fire 3.
2015-01-06 20:57:19 -08:00
Unknown W. Brackets
06e9d7680a
Handle a case of 480x360 framebuffers.
...
Region and scissor are 480x360, but viewport is just default (also,
throughmode is on.) We could add more checks, but just the height being a
bit higher is already unusual, so should be relatively safe.
Fixes #7277 .
2015-01-06 00:02:05 -08:00
Unknown W. Brackets
eee3ac79f4
Always clamp in ToRGB[A]?().
...
Before we only clamped with SSE, better to be consistent. This may also
be slightly faster.
2014-10-31 09:07:54 -07:00
Unknown W. Brackets
bccb8dfb1e
d3d: Correct render-to-texture effects.
...
Was checking the corners wrong.
2014-09-14 09:37:59 -07:00
Unknown W. Brackets
692cc8dbf1
d3d: Support the Breath of Fire 3 hack.
...
Since framebuffers are not always flipped.
2014-09-14 00:49:40 -07:00
Henrik Rydgard
19a9c4481f
Move GLES' SoftwareTransform to Common
2014-09-13 13:27:42 +02:00