Commit Graph
220 Commits
Author SHA1 Message Date
Unknown W. Brackets e45daac41c Fix a dumb mistake for shader framebuf fetch. 2015-03-14 00:14:59 -07:00
Henrik Rydgård 33b291a36e Merge pull request #7567 from unknownbrackets/gpu-blend
Use framebuffer fetch more and on more devices
2015-03-09 22:24:23 +01: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 39347efda4 Fix shader blending on ARM devices, oops. 2015-03-08 00:12:29 -08:00
Unknown W. Brackets eb349a1978 Make sure not to try multiple shader fetch exts. 2015-03-07 22:31:55 -08:00
Unknown W. Brackets 08a1bb8796 Add support for ARM_shader_framebuffer_fetch. 2015-03-07 16:11:43 -08:00
Unknown W. Brackets 2344760018 Use framebuffer fetch for more accurate blending.
On devices which support it, framebuffer fetch should give us more correct
blending than copying fbos or using a fallback (such as doubling which may
clamp.)

Not actually tested on any supported device.
2015-03-07 12:09:27 -08:00
Unknown W. Brackets 9c3ccc97a2 Support EXT_shader_framebuffer_fetch.
We only supported NV_ before.  Not tested on any supporting device, but
this is primarily found on PowerVR devices.  This may allow them to
perform effects (like min/max/etc.) more accurately and quicker.
2015-03-07 12:07:53 -08:00
Henrik Rydgard d9e543fdd2 Reduce PowerVR blockiness problems on older GPU revisions. #7153 #7150 2014-12-15 01:16:07 +01:00
Henrik Rydgard f424bf73ae GLES: Implement a custom modulo function for PowerVR. Fixes blockiness, see #7153 and #7150 2014-12-14 20:59:21 +01:00
Henrik Rydgard b4b7cd0722 GLES: Merge the two ShaderID classes as they are identical.
I don't expect the number of bits required to grow or shrink massively for either type of shader in this backend.
2014-12-14 19:24:11 +01:00
Henrik Rydgard ff68e32f88 Try to fix flat/smooth shade mode issue (caused shader mismatches) 2014-12-02 01:13:26 +01:00
Henrik Rydgard da1352c924 Don't bother specifying smooth shading, it's the default. 2014-12-02 00:57:51 +01:00
xebra f032936575 Fix flat shading for unsupported hardware. 2014-12-01 19:16:20 +09:00
xebra 34fe8300ab Support flat shading. 2014-11-28 18:59:14 +09: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 6e34fe1c4b d3d9: Fix fbo tex clamp (usually shadows.) 2014-09-21 11:07:02 -07: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 04147827ee Account for texel offsets in the frag test lookup.
Darn, thought this wouldn't be necessary but it is is for 1/255 and other
values.

Without cache:
PowerVR: temp, add, mul, fract, mul, compare
Other: mul, add, floor, compare

With cache: mul, add, texture lookup, compare
2014-09-08 19:04:44 -07:00
Unknown W. Brackets 76d5f67796 Arg, fix color testing from frag test cache. 2014-09-07 23:21:22 -07:00
Henrik Rydgård 1985e6db9a Merge pull request #6853 from unknownbrackets/testcache
Cache fragment test results using a texture
2014-09-07 23:55:53 +02:00
Unknown W. Brackets c0908421ba Skip binding when the test won't be used. 2014-09-07 10:06:57 -07:00
Unknown W. Brackets 94c1271761 Add an experiment with using a texture for tests.
Using an option for now so it's easy to test, if it works well we can
maybe remove the option.
2014-09-07 10:04:57 -07:00
Unknown W. Brackets 47e98f972d Try to simplify alpha replace for poor compilers. 2014-09-07 08:25:39 -07:00
Unknown W. Brackets de2c951665 Detect EXT_gpu_shader4 to use bitwise ops pre-3.3.
This may allow it to work on more cards, and should fix a (probably driver
bug) error we've had reported in GL 3.0 / GLSL 1.3.
2014-09-04 00:39:54 -07:00
Unknown W. Brackets b4b81744ee Use dst factor w/ dst in reverse sub blending. 2014-08-26 00:39:14 -07:00
Unknown W. Brackets 17ab856a35 Always zero drawn pixels with zero. 2014-08-24 10:24:29 -07:00
Unknown W. Brackets 90746fb5b2 Support INVERT with stencil alpha replacement. 2014-08-24 10:24:28 -07:00
Unknown W. Brackets 0018638458 Support INCR/DECR with stencil value replacement. 2014-08-24 10:24:28 -07:00
Ced2911andHenrik Rydgard 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 7f61da2e5a Add a hack for Silent Hill games.
Either way has different problems, but it sounds like this will work
better for Silent Hill.  Probably still rendering wrong, unfortunately.
2014-08-18 23:20:49 -07:00
Unknown W. Brackets a43c3771a3 More correctly blend when hitting the frame cap.
If we hit too many blits per frame, fall back correctly in the shader.
2014-08-18 23:20:48 -07:00
Unknown W. Brackets 422db25277 Optimize fixed color blending that isn't blending.
Gods Eater Burst uses this, for example.
2014-08-18 23:20:48 -07:00
Unknown W. Brackets b79e4d22b8 Improve a possible obscure blend mode.
Seems like this would be likely to get overlap problems.
2014-08-18 23:20:47 -07:00
Unknown W. Brackets 0904085eb5 Avoid using fbo copies for the common 2a + 1-2a.
We won't even get it right that often since the copy doesn't deal with
overlap properly.
2014-08-18 23:20:47 -07:00
Unknown W. Brackets a41333c012 Avoid premultiplying easy fixed colors. 2014-08-18 23:20:46 -07:00
Unknown W. Brackets 24a0dd12ef Avoid recalculating replaceBlend so many times. 2014-08-18 23:20:45 -07:00
Unknown W. Brackets 44620c92ed Premultiply for doubled alpha blending if possible.
This makes the effect more accurate where the values were being clamped
before.  Some obscure methods of blending may be slower.
2014-08-18 23:20:45 -07:00
Unknown W. Brackets 4a8d52ab1a Add a config option for the slow framebuf effects.
Like cluts, blitting, etc.  At higher render resolutions these are
expensive, and on some mobile devices they may be too much.

Of course, they're only used when needed so this is a speedhack.
2014-07-08 23:57:27 -07:00
Unknown W. Brackets edd760fe39 Oops, forgot a cast. 2014-07-03 01:30:08 -07:00
Unknown W. Brackets 61ea20875c Fix shader blending on ARM GLES3 devices.
We currently ban them from GLES3, and this was interacting with that
incorrectly.  Should we still ban them, though?
2014-07-03 00:15:15 -07:00
Unknown W. Brackets e364de42cb Ensure #extension is before non-# tokens.
As required by Tegra devices from reporting.
2014-07-02 23:21:52 -07:00
Unknown W. Brackets c379169efc Try to fix colormasking on GLES3 devices.
Not tested, though, since I don't have one... from reporting.
2014-07-02 23:15:02 -07:00
Unknown W. Brackets 6e751f8092 Use shader blend for min/max when unsupported. 2014-06-17 00:20:06 -07:00
Unknown W. Brackets 17f5acd8b0 Support more src alpha doubling modes.
These prevent the need for more blits.
2014-06-17 00:20:05 -07:00
Unknown W. Brackets 143ad92afd Convert blending to doubling in more cases.
We're not doubling the alpha, so all these cases are safe regardless of
the alpha value.
2014-06-17 00:20:04 -07:00
Unknown W. Brackets 256436b594 Support fixed/fixed blending without a blit. 2014-06-17 00:20:04 -07:00