Commit Graph
61 Commits
Author SHA1 Message Date
Henrik Rydgård fb2ac3a67e Additional fixes 2020-10-25 08:34:35 +01:00
Henrik Rydgård 69c8912b93 More tess fixes 2020-10-25 08:34:35 +01:00
Henrik Rydgård 6055350a2c Initial work on fixing tess 2020-10-25 08:34:35 +01:00
Henrik Rydgård 7532116b69 Fix additional minor differences 2020-10-25 08:34:35 +01:00
Henrik Rydgård a8f4a4d749 Fix more vertex shader differences 2020-10-25 08:34:35 +01:00
Henrik Rydgård 057fd9f8a3 Bridge more vertex shader differences 2020-10-25 08:34:35 +01:00
Henrik Rydgård 22b26ffc09 Time for the vertex shaders. Set up a test, start eliminating differences. 2020-10-25 08:34:35 +01:00
Henrik Rydgård 9e245d6835 OpenGL: Share the shader version detection.
Use a version integer instead of a string
2020-10-23 10:03:44 +02:00
Henrik Rydgård c45515866b Cleanup
Clean up GLSL language setup further
2020-10-23 10:03:44 +02:00
Henrik Rydgård 2917b0e9e6 GLES: Read compat params first, emit code later. 2020-10-23 10:03:44 +02:00
Henrik Rydgård 2c0a3c2e23 Prepare for more GLSL testing 2020-10-21 23:39:34 +02:00
Henrik Rydgård 3d36049b65 Rename shader generator functions, a bit of moving around and adding an errorString param. 2020-10-21 23:20:25 +02:00
Henrik Rydgård 391d2ea73d Rename vk uniforms to match the other backends 2020-10-21 21:13:08 +02:00
Henrik Rydgård 0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Henrik Rydgård ed88761ecc Merge ext/native/stringutil.cpp/h into Common/StringUtils.cpp/h. 2020-09-29 15:51:51 +02:00
Unknown W. Brackets 4a0109d273 GPU: Treat negative light exp same as 0.
Based on #12507 and some tests, seems like negative exponents are also
fixed to a 1.0f result.
2020-03-22 22:28:05 -07:00
Henrik Rydgård 09b5546828 Apply the same Mali range culling "fix" in OpenGL. 2019-08-09 00:09:06 +02:00
Unknown W. Brackets 1c19bce514 GPU: Correct specular exponent zero. 2018-11-22 08:53:25 -08:00
Unknown W. Brackets 4816bfc1a6 GPU: Skip specular on negative diffuse factor.
This is correct per hardware tests, see #8403.  Note that the PS3 emulator
running PSP HD remasters does not correctly handle this, and applies
specular for negative diffuse factor.
2018-11-22 08:53:25 -08:00
Unknown W. Brackets 6e46d6c0f9 GPU: Correct powered diffuse with exp=0.
Just to ensure negative factors are handled too, as they are on hardware.
2018-11-22 08:53:25 -08:00
Unknown W. Brackets 1cec9f5ea1 GPU: Handle spot light with 0 exp or length. 2018-11-22 08:53:25 -08:00
Unknown W. Brackets 9a4cd5bd9d GPU: Skip specular on powered diffuse.
Matches hardware tests and improves lighting for Virtua Tennis, see #4140.
2018-11-22 07:59:56 -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
Henrik RydgårdandGitHub 22c066515e Merge pull request #11425 from xebra/refactor_spline_bezier
[Refactoring] Improve spline/bezier.
2018-11-04 17:04:29 +01:00
Henrik Rydgård fa40bcff8d Disable triangle range culling on D3D9 on Intel. Should fix #11477 2018-10-21 09:36:15 +02:00
xebra 41823f8780 [spline/bezier]Fix GLES texture resolution of HW tess to real 2D to avoid huge width in FF4CC mist dragon morphing. 2018-10-07 23:54:23 +09:00
xebra 89786b943d [spline/bezier]Instanced rendering for B-Spline is very slow when using weak GPU, so disabled it and simplify the shaders.
Add changing the quality of HW tessellation.
2018-10-07 23:54:22 +09:00
xebra 3216a83a92 [spline/bezier]Expand loops in the shaders. 2018-10-07 23:54:14 +09:00
xebra 8c279c0e25 [spline/bezier]Precalculate weights in the shaders using the outer product. 2018-10-07 23:54:13 +09:00
xebra 453e274fbe [spline/bezier]Fix around vertex type flags. 2018-10-07 23:54:11 +09:00
xebra d4a667397c [spline/bezier]Improve shader uniforms a bit. 2018-10-07 23:54:10 +09:00
xebra de5975f13e [spline/bezier]Reduce multiplications in the shaders from 16 to 4. 2018-10-07 23:54:09 +09:00
xebra 103d180ae7 [spline/bezier]Get rid of wasted if-checks at Graphics Processors. 2018-10-07 23:54:08 +09:00
xebra 41d6c3cf3a [spline/bezier]Move whole tessellation logic in the shaders into a subroutine. 2018-10-07 23:54:08 +09:00
xebra 3d07bca010 [spline/bezier]Fix spline weights calculation and get rid of using next patch position in hwtess.
# Conflicts:
#	GPU/Directx9/VertexShaderGeneratorDX9.cpp
#	GPU/GLES/VertexShaderGeneratorGLES.cpp
#	GPU/Vulkan/VertexShaderGeneratorVulkan.cpp
2018-10-07 23:54:07 +09:00
xebra 3c0fb44f2e [spline/bezier]Improve hwtess to use cached weights. 2018-10-07 23:54:05 +09:00
xebra 1b076f8324 [spline/bezier]Improve HW tess on Opengl to combine 3 textures into a single texture and use it. 2018-10-07 23:54:03 +09:00
Unknown W. Brackets 26cd98cd7e GPU: Fix a shader unit typo. 2018-09-24 23:05:32 -07:00
Unknown W. Brackets 639a3f406d D3D9: Implement vertex range culling. 2018-09-17 07:27:26 -07:00
Unknown W. Brackets ab3a466621 GLES: Implement vertex range culling.
Based on tests, skips triangles with any point outside the 4096x4096 box,
except when depth clamping would engage.
2018-09-17 07:27:26 -07:00
Unknown W. Brackets 332788d0b5 GPU: Clean up some shader id flag usage. 2018-09-09 09:59:42 -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 8953d7ff73 Revert "Comment fixes, reindentation."
This reverts commit 6fa9fcefb2.
2018-04-10 12:14:23 +02:00
Henrik Rydgård d8651fd85b Combine the lightAngle and spotCoef float uniforms into one float2. Saves 64 bytes from the light uniform buffer, making it an even 512.
Probably a very small perf optimization.
2018-03-12 11:17:45 +01:00
Henrik Rydgård 6fa9fcefb2 Comment fixes, reindentation. 2018-03-05 00:03:47 +01:00
Henrik Rydgård 40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Henrik Rydgård ccdb4d186d gl-render-manager: Fix HW tesselation. Remove 1D texture support, likely no benefit. 2018-01-27 15:10:17 +01:00
Unknown W. Brackets 4731a2918c GPU: Use more typesafe shader IDs.
Since they really are fairly distinct, let's make sure we can't mix them
accidentally.
2017-12-02 09:07:27 -08:00
Henrik RydgårdandGitHub a67357db05 Merge pull request #10223 from unknownbrackets/minor
Reporting: Use a different link message on preload
2017-12-01 20:28:37 +01:00
Unknown W. Brackets 2a540de329 Reporting: Use a different link message on preload.
May help us determine if this only happens from a corrupt cache.
2017-12-01 11:17:51 -08:00