Commit Graph

126 Commits

Author SHA1 Message Date
Henrik Rydgård
d65dae7185 Depth scale functions: Clean up the naming, add a failing test 2023-02-10 14:57:45 +01:00
Henrik Rydgård
26c748f959 Make fog-enable driven by uniform instead of fragment shader flag bit 2023-01-04 10:14:11 +01:00
Unknown W. Brackets
6584899891 GPU: Account for perspective in non-centered lines. 2022-12-26 10:13:38 -08:00
Henrik Rydgård
c25e563d13 Fix rendering of lines with the same x/y but different z.
Also enabled centered lines in WebFest homebrew.
2022-12-26 18:16:54 +01:00
Unknown W. Brackets
a7b7bf7826 Global: Set many read-only params as const.
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
Henrik Rydgård
e6f0f84a45 SSE optimize Float4ToUint8x4, some uses 2022-12-01 16:32:23 +01:00
Henrik Rydgård
d02f46cb27 Minor VertexReader optimizations 2022-12-01 16:00:47 +01:00
Henrik Rydgård
72029b678a Empirical attempt at fixing #15661
Basically, software culling fails in some configuration, like the one we
end up with on Mali.

As noted by unknownbrackets in #15661, the viewport Z scale, offset is -0.0, 0.0.

We end up with CalcCullParams computing minZValue == maxZValue == 1.0f,
and with the vertices ending up with z,w == 1.0, 1.0.
and as a result, the inside/outside calculations will always decide that
it's outside.

Changing the comparisons from >= / <= to > / < fixes the problem, but I
don't know if this might break something else.

Anyhow, here's the simple way to repro on PC:

Change the ending of GPU_Vulkan::CheckFeatures to:

```c
	return GPU_USE_LIGHT_UBERSHADER | GPU_USE_BLEND_MINMAX | GPU_USE_TEXTURE_NPOT | GPU_USE_INSTANCE_RENDERING |
		GPU_USE_VERTEX_TEXTURE_FETCH | GPU_USE_TEXTURE_FLOAT | GPU_USE_16BIT_FORMATS | GPU_USE_TEXTURE_LOD_CONTROL |
		GPU_USE_DEPTH_TEXTURE | GPU_USE_ACCURATE_DEPTH;
```
2022-11-27 23:16:16 +01:00
Unknown W. Brackets
3de2557ecb GPU: Always skin in decode for software transform. 2022-11-06 08:55:07 -08:00
Unknown W. Brackets
6c36f03a0d GPU: Purify vertTypeIsSkinningEnabled(). 2022-11-06 08:40:54 -08:00
Henrik Rydgård
9b8a5d1db3 Rename GPU_SUPPORTS_ to GPU_USE_ 2022-10-17 08:47:03 +02:00
Henrik Rydgård
daca0b2109 Rename gstate_c.Supports to gstate_c.Use 2022-10-17 08:46:37 +02:00
Unknown W. Brackets
97ae4ae712 GPU: Correct flat normal projection mapping. 2022-09-26 15:11:11 -07:00
Unknown W. Brackets
34a8056017 GPU: Correct normalized zero normal proj map.
Unlike lighting, this does not use 0, 0, 1.
2022-09-26 15:11:11 -07:00
Unknown W. Brackets
0a24004eac GPU: Account for w properly in lines, fixing width.
See #15756.
2022-09-20 15:12:16 -07:00
Henrik Rydgård
751afde7c9 Echochrome lines: Remove UV offsets, avoid reading the destination (much better codegen) 2022-06-11 11:22:29 +02:00
Henrik Rydgård
c82d8a04e0 Add centered line drawing for Echochrome. 2022-06-11 00:20:35 +02:00
Henrik Rydgård
493c17647a Take the absolute value when measuring pixel size for line expansion.
Fixes issues in Echochrome. Though still doesn't look fantastic.
2022-06-11 00:03:40 +02:00
Unknown W. Brackets
001d67b711 GPU: Remove explicit rect/line depth cull.
This appears to be breaking NFS (#15129) and isn't fully correct since
the triangles are still later checked anyway.
2021-12-13 23:07:26 -08:00
Henrik Rydgård
c07068f89b Fix text wrapping on PromptScreen by improving the layout 2021-12-13 22:42:03 +01:00
Henrik Rydgård
b85a7e9a46 Name uniform buffers, add more asserts. Used this to track down the bug fixed in the previous commit. 2021-12-10 21:01:01 +01:00
Unknown W. Brackets
ec1d980b30 GPU: Sort line verts to correct bias.
We want it to consistently go down and right.  This improves Persona 2 UI
significantly (see #3332.)
2021-11-02 21:57:00 -07:00
Unknown W. Brackets
76e1690646 GPU: Keep diagonal lines the same width. 2021-10-31 15:49:20 -07:00
Unknown W. Brackets
2718e81c0e GPU: Expand lines to triangles. 2021-10-31 14:46:46 -07:00
Unknown W. Brackets
ea6d0f07e4 GPU: Correct point width/height.
Oops, shouldn't be half in 3D transform.
2021-10-31 13:19:51 -07:00