Commit graph

34 commits

Author SHA1 Message Date
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
Ced2911
ef54989598 [Gpu] update code, cleanup shaders generation: fixes rr2 lighting !
Conflicts:
	GPU/Directx9/PixelShaderGeneratorDX9.cpp
	GPU/Directx9/ShaderManagerDX9.cpp
	GPU/Directx9/VertexDecoderDX9.cpp
2014-08-24 13:43:09 +02:00
Ced2911
d4adc3abb8 [dx9] don't do alpha test in pixel shader, use state mapping
hrydgard: Cleaned up a bit, disabled by default

Conflicts:
	GPU/Directx9/TextureCacheDX9.cpp
2014-08-24 09:52:34 +02:00
Unknown W. Brackets
2038bc5527 Support alpha / color test masks on desktop/gles3.
Won't work on GLES 2, though...
2014-06-16 00:33:48 -07:00
Unknown W. Brackets
f55b6a0dbc Put the DirectX9 stuff into a namespace.
This makes it almost build on Windows, but not quite.  Some required files
excluded from build, still.
2013-09-15 08:56:12 -07:00
Henrik Rydgard
cc6681cd0b Compile Ced's DX9 GPU on Windows. Not hooked up yet.
This needs work, has several problems that must be fixed to run on Windows.

Ced, you'll have to fix up your xb project file a bit, sorry.
2013-09-15 12:52:44 +02:00
Renamed from GPU/Directx9/FragmentShaderGenerator.cpp (Browse further)