Commit Graph
55 Commits
Author SHA1 Message Date
Unknown W. Brackets 022670d882 GPU: Apply fog before color test.
Hardware tests confirm the fog result is what's color tested.
2018-09-09 23:59:48 -07:00
Unknown W. Brackets 8eb011c22d GPU: Clamp after color doubling.
This is needed for blending to be correct - it blends a clamped value.
2018-09-09 20:27:39 -07:00
Unknown W. Brackets 703181607e GPU: Apply color test after doubling. 2018-09-09 20:09:48 -07:00
Unknown W. Brackets 4dafb163a3 D3D11: Split color test out by component.
Not working correctly together.  See #10629.
2018-09-08 20:03:26 -07:00
Unknown W. Brackets b845278d7d D3D11: Implement flat shading in shader. 2018-06-06 05:53:49 -07:00
Henrik Rydgård 4a0c2ad683 Minor uniform cleanup 2017-12-08 11:54:49 +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
Unknown W. Brackets a1f59deafe Fix some type narrowing warnings and typos. 2017-03-19 07:44:31 -07:00
Henrik Rydgard 5d5844632a Fix shader issues with D3D11 feature level 9 2017-03-05 22:56:33 +01:00
Henrik Rydgard f5fa238e22 More minor changes to make GPU and native build on UWP later 2017-02-24 20:26:38 +01:00
Henrik Rydgard 8eb668ea59 D3D11: Enable pixel depth rounding. GL: Fix a crash bug 2017-02-23 20:40:53 +01:00
Henrik Rydgard 4538edad14 Work towards enabling shader blending on D3D11 2017-02-17 12:21:18 +01:00
Henrik Rydgard 56b3a823ba D3D11: Improved alpha/color test, like in GL/Vulkan 2017-02-14 10:34:55 +01:00
Henrik Rydgård 6033b1ee05 D3D11: Some cleanup. Fix backface culling. Wipeout still looks weird... 2017-02-12 18:29:58 +01:00
Henrik Rydgård 328201978f D3D11: Prepare for dual src blending support 2017-02-12 17:10:04 +01:00
Henrik Rydgård 4f2fb10347 Further D3D11 fixes 2017-02-12 16:14:14 +01:00
Henrik Rydgard f9b840dbfd More D3D11 progress 2017-02-10 00:01:56 +01:00
Henrik Rydgard 01f46e7a5d Make the first generated D3D11 shaders compile, fix various warnings 2017-02-09 15:04:21 +01:00
Henrik Rydgard ba95e0f4d9 Initial stab at porting the DX9 backend to D3D11. Not working yet. 2017-02-09 13:28:40 +01:00
Henrik Rydgard ba52ba8714 Move global.cpp to native/gfx/d3d9_shader.cpp 2017-02-05 20:50:17 +01:00
Henrik Rydgard 24cc3dbc70 Always pass vec3 texcoord between vertex and fragment shader, to allow for some simplification. 2017-01-30 16:03:57 +01:00
Unknown W. Brackets c22953a4b9 Treat invalid blend factors as fixed consistently. 2015-11-19 06:48:06 -08:00
Unknown W. Brackets bf7f07f918 Optimize inverse blending modes, where possible.
Also, take advantage of cases where we can double src and src.a in the
shader, which can in some cases get us closer to accurate.
2015-11-14 12:37:32 -08:00
Henrik Rydgard 6b2862284b Minor cleanups 2015-11-02 20:09:59 +01:00
Henrik Rydgard f4248cb550 Remove a whole lot of flipping special cases 2015-11-02 20:07:30 +01:00
Henrik Rydgard 838e53f482 Delete disabled code to use built-in alpha test on DX9. 2015-10-25 01:26:38 +02:00
Henrik Rydgard 85229efef4 D3D9: Generate shaders directly from shader IDs, just like we do in GL. 2015-10-25 00:34:23 +02:00
Henrik Rydgard edafa9bc17 Centralize the GPU state conversion functions 2015-10-24 23:49:05 +02:00
Henrik Rydgard 92389a4966 Use a common ShaderId class. Start moving shader ID code to GPU/Common 2015-10-24 23:24:06 +02:00
Unknown W. Brackets e1df8fc45f Centralize sampling params and test optimizations. 2015-09-13 06:38:07 -07:00
Henrik Rydgard b5f7d9346f Minor cleanups in GPU 2015-07-29 13:08:02 +02:00
Henrik Rydgård 9db4c5f34d Merge pull request #7573 from unknownbrackets/gpu-minor
Small optimizations to software transform
2015-03-09 09:59:45 +01:00
Unknown W. Brackets f0676b0c85 Optimize color tests against zero.
They seem to be somewhat common.  Speeds up Tales of Phantasia X a bit.
2015-03-08 19:08:21 -07:00
Unknown W. Brackets cf7a4ab2cf Avoid shader id data that doesn't change shader.
This may reduce shader switches, or more likely at least total # of
shaders, when alpha test settings are changed but alpha test is not
enabled.
2015-03-08 18:28:59 -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
Unknown W. Brackets d4e74e6998 d3d9: Clarify a comment. 2015-03-01 11:47:39 -08:00
Unknown W. Brackets c88b66b308 d3d9: Emulate some logic ops with blending.
This makes Brave Story's intro visible.  Also add for GLES2/GLES3, but
doesn't seem to work on GLES2.
2014-09-23 21:13:47 -07:00
Unknown W. Brackets 6618681d05 d3d9: Oops, can't use shader blending anyway. 2014-09-21 12:17:16 -07:00
Unknown W. Brackets 856154a5f9 d3d9: Replace alpha and premultiply blend.
Unfortunately they are fairly tied together.
2014-09-21 12:01:49 -07:00
Unknown W. Brackets 6e34fe1c4b d3d9: Fix fbo tex clamp (usually shadows.) 2014-09-21 11:07:02 -07:00
Unknown W. Brackets ccb6e99e07 d3d9: Disable color doubling without tex.
As the PSP does.
2014-09-21 10:58:21 -07:00
Unknown W. Brackets 8bf13d4214 d3d9: Add stencil and blend replacement helpers. 2014-09-21 10:56:54 -07:00
Unknown W. Brackets 77b2da7345 d3d9: Update some areas of the pix shader.
Will eventually want this to have the clamping etc.
2014-09-21 00:07:07 -07:00
Unknown W. Brackets 6f38c21ccc d3d9: Make the vertex shaders more similar. 2014-09-20 23:55:48 -07:00
Henrik Rydgard 7b66059ae0 D3D: Assorted cleanup. Add a missing register specification. 2014-09-10 15:20:57 +02:00
Henrik Rydgard d2d563cd2c D3D: Use fixed constant registers for pixel shader constants 2014-09-10 12:59:33 +02:00
Unknown W. Brackets 9af40cb14f d3d: Update the texture cache to mostly match.
Now we can reduce the differences down.
2014-09-09 00:53:01 -07:00
Unknown W. Brackets 030a9d55e7 d3d: Use unnormalized values for alpha testing.
Fixes Tales of Eternia's world map, Popolocrois everwhere, etc.

If PowerVR is using this method on GLES, it may be broken for the same
reasons.
2014-09-08 21:37:25 -07:00
Unknown W. Brackets a29c2f4f2f d3d: Use 2.0 vertex and pixel shaders. 2014-09-06 23:01:03 -07:00
Unknown W. Brackets 1f51fe7843 d3d: Avoid rewriting textures, just swizzle.
Luckily A is in the same place and the same width, so we can do this for
all but framebuffers easily.

Technically we could do it in OpenGL as well.

Small (1-2%) performance improvement in FF2.
2014-08-28 01:20:21 -07:00