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
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
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
Unknown W. Brackets
d1357e5bc8
Fix another mistake in color test masking.
2014-06-16 02:12:08 -07:00
Unknown W. Brackets
a28354f072
Fix dumb typo.
2014-06-16 01:42:19 -07:00
Unknown W. Brackets
982f0416a2
Pre-mask alphatest value as a small optimization.
...
Might cause small behavior difference on gles2 (without bitwise ops.)
2014-06-16 00:35:30 -07: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
Henrik Rydgård
036cde7768
Merge pull request #6313 from unknownbrackets/gpu-minor
...
Implement in-shader blending on gles2 / gl2
2014-06-14 09:21:30 +02:00
Unknown W. Brackets
444128dcdd
Support NEVER alpha/color tests.
2014-06-13 23:44:40 -07:00
Unknown W. Brackets
1d9f7b04fc
Implement in-shader blending on gles2 / gl2.
...
I'm sure it'll be slow, though...
2014-06-13 23:42:59 -07:00
Henrik Rydgard
3e97713d16
Revert "Remove option" (disable alpha test)
...
Fixes issue #6286 .
This reverts commit d2ce635bbf
.
2014-06-10 23:13:42 +02:00
Henrik Rydgard
34b5a1c2f3
Disable precision qualifiers on desktop GL
2014-06-10 22:44:53 +02:00
Unknown W. Brackets
b163ab9203
Use an extra shader id bit to skip offsetting.
...
Since the vast majority of the time it will be 0.
2014-06-08 14:28:18 -07:00
Unknown W. Brackets
865941a66d
Ignore needShaderTexClamp when not texmapping.
2014-06-08 14:27:57 -07:00