Commit Graph
404 Commits
Author SHA1 Message Date
Unknown W. Brackets d8eaeab663 Reduce change frequency limit for texscaling.
Since we have the texels limit now, this should allow more textures to be
scaled safely.  Also, it may detect alpha optimizations in more textures,
since we currently skip them for frequently changed textures.
2014-06-14 10:49:13 -07:00
Unknown W. Brackets 0620c6edc7 Forgive freq. changed tex if they mend their ways. 2014-06-14 10:43:22 -07:00
Unknown W. Brackets 99c8319f15 Don't count unscaled frequently changing texels.
May cause more things to be scaled per frame (especially if first textures
on a frame are frequently changing.)
2014-06-14 10:40:23 -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
Henrik Rydgård 5fa331bb56 Merge pull request #6310 from hrydgard/deferred-scaling
Limit the amount of texture scaling done per frame to reduce stutters
2014-06-14 08:59:40 +02: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
Unknown W. Brackets 673e92927a Avoid an infinite loop on small heights. 2014-06-13 23:37:08 -07:00
Henrik Rydgard 4e81eadc88 Minor cleanup in texcache 2014-06-14 00:18:37 +02:00
Henrik Rydgård 2f86e3e021 Clear STATUS_TO_SCALE at a better place 2014-06-13 23:01:40 +02:00
Henrik Rydgård ea9f8d8bf3 Comment out the deferred scaling logs. 2014-06-13 22:11:25 +02:00
Henrik Rydgård c0c058937f Limit the amount of texture scaling done per frame, to reduce stutters
Scaling causes really bad stutters in some games on some hardware.

This should also reduce the impact of pathological cases like the first
boss of FF Type-0 to be more bearable.
2014-06-13 22:07:26 +02:00
Unknown W. Brackets f84650b6be Report possible textures at subareas > 32.
For the ones outside the hack 0x04110000 range.
2014-06-13 09:19:51 -07:00
Unknown W. Brackets 025b92593a Just don't use render-to-text format mismatches.
This already excludes CLUTs.
2014-06-12 07:46:56 -07:00
Unknown W. Brackets 1a25456e52 Detach a format mismatch that's not rendering.
Assume we'd be better off reading ram.
2014-06-12 00:48:21 -07:00
Unknown W. Brackets 89206a8a09 Allow render-to-tex with > 16 y offset.
Trying to keep it cautious in case our sizes are wrong.
2014-06-12 00:41:42 -07:00
Unknown W. Brackets ef12694c4b Don't update render tex x/y offset unless matched.
Sometimes we have false matches, they should be skipped.  Fixes some bloom
that is off in some games.
2014-06-09 22:45:14 -07:00
Unknown W. Brackets 3884550c7b Remove a few TODOs that aren't relevant anymore. 2014-06-08 22:35:48 -07:00
Henrik Rydgård 89667a870b Merge pull request #6259 from unknownbrackets/fbtex-offset
Apply byte offset when using rendered textures
2014-06-08 23:34:22 +02:00
Unknown W. Brackets 865941a66d Ignore needShaderTexClamp when not texmapping. 2014-06-08 14:27:57 -07:00
Unknown W. Brackets acab898be0 Keep track of x/y offset for render-to-tex.
Fixes intro in Valkyrie Profile now that we're wrapping correctly.
2014-06-08 14:27:05 -07:00
Henrik Rydgard 9c799b773d Don't use glTexStorage2D, see issue #6075
Probably didn't help much anyway.
2014-06-08 18:36:18 +02:00
Unknown W. Brackets 0896c3412d Allocate textures names in blocks.
May improve performance slightly when loading or recycling textures.
Probably uploading the texture is bigger anyway.
2014-06-07 16:13:53 -07:00
Unknown W. Brackets cc841bbe4c Apply tex wrap/clamp in shader for render-to-tex.
Fixes graphical artifacts in Wild Arms XF (which depends on how you get
there, because it's based on the size of the framebuffer.)
2014-06-07 13:13:58 -07:00
Unknown W. Brackets 3d8f078b6c Try to workaround Breath of Fire 3's render-to-tex.
It renders to two areas but textures with a high V to reach the second
texture.  We've been wrapping the V around but this may show the right
buffer.
2014-06-06 00:28:12 -07:00
Henrik Rydgård e6d3a9c1b6 Merge pull request #6211 from unknownbrackets/framebuf-estimate
Another attempt at framebuffer size estimate changes
2014-06-03 10:50:21 +02:00
Unknown W. Brackets 238bdce2b8 Detect if framebuffer clut uses alpha.
It's not a perfect check but it may allow skipping alphatests sometimes.
2014-06-03 01:06:02 -07:00
Unknown W. Brackets bf788e278d Change CheckAlpha() to apply to any pixel data.
For example, cluts.  But not yet, just changing it here.
2014-06-03 00:59:34 -07:00
Unknown W. Brackets a18eceac71 Don't skip alpha in 565/clut framebuffers textures. 2014-06-03 00:45:15 -07:00
Unknown W. Brackets c2ccfd5629 Stop stretching things to the FBO size.
Instead, draw in the top corner.  This way, even if framebuffers get
smaller things stay consistent.
2014-06-01 21:20:04 -07:00
Sacha 319c0efcb2 Remove MAY_HAVE_GLES3 2014-06-02 12:08:49 +10:00
Unknown W. Brackets 0846673dc3 Track temporary-use FBOs all in FramebufferManager.
This way it's easier to manage their lifecycle.
2014-06-01 01:03:43 -07:00
Unknown W. Brackets 4195eac04f Get rid of depalFBOs when overwriting textures.
Just in case they are not always used as framebuffers.  We set to 0 later
anyway.
2014-06-01 01:03:04 -07:00
Unknown W. Brackets 580143e5e2 Disable vertex arrays before depal as well. 2014-05-31 22:07:42 -07:00
Henrik Rydgard 44d9af9222 Hopefully fix the Manhunt red/green swap 2014-05-27 22:22:56 +02:00
Unknown W. BracketsandHenrik Rydgard 29a9ff369e Make a note when we need to reset the shader.
Hmm, not sure this is the cleanest way.
2014-05-27 22:12:25 +02:00
Unknown W. BracketsandHenrik Rydgard 14c081904c 5650 is also simple alpha. 2014-05-27 22:12:24 +02:00
Unknown W. BracketsandHenrik Rydgard 5f99f663ef Avoid duplicating an FBO when depaletizing it. 2014-05-27 22:12:23 +02:00
Unknown W. BracketsandHenrik Rydgard 5ac6fae8bb Validate framebuffer clut shaders on use.
When their parameters are actually the ones we are going to use.
2014-05-27 22:11:20 +02:00
Unknown W. BracketsandHenrik Rydgard aa32bd6aa4 Also disable the logic op when rendering FB w/clut. 2014-05-27 22:11:18 +02:00
Henrik Rydgard 7062da0483 Fix some more issues. The snow scene in FF Type 0 now looks B/W instead of broken. 2014-05-27 22:10:36 +02:00
Henrik Rydgard 634add3a46 Depalettize works at other resolutions than 1x. For some strange reason though if you change resolution in game it breaks. 2014-05-27 22:09:26 +02:00
Henrik Rydgard d414327da7 Use a small offset to turn NEAREST into floor() when sampling the clut.
Minor fixes and cleanups.
2014-05-27 22:09:25 +02:00
Henrik Rydgard d0e65054a4 A bit closer to working. Shadow visible 2014-05-27 22:09:22 +02:00
Henrik Rydgard 8fba7fa98e Initial work on depalettization. 2014-05-27 22:07:24 +02:00
Unknown W. Brackets ec0ae44200 Don't force nearest for colortest against black.
Should fix #4217 and be relatively safe.  Probably it's a common colortest
ref color that's safe?
2014-05-15 23:52:16 -07:00
Unknown W. Brackets 99458d7797 Avoid forcing nearest/disabling linear if possible.
If we know that the test is trivially true, we don't need to worry about
the test.  May help #4405.
2014-05-15 22:38:44 -07:00
Unknown W. Brackets 2d12eb3394 Do not specify max LOD for no-mipmap textures.
Fixes #6077, incorrect filtering with no mipmaps in Popolocrois.
This was causing it to use the mag filtering setting, even when minifying.
2014-05-13 22:40:58 -07:00
Unknown W. Brackets f660c04983 Optimize double alpha blending for 1/0 textures.
If the blend is 2*a / 1-a, and the alpha is either 1 or 0, we can still
use color doubling instead.  Fixes #3379 (Persona 2.)
2014-05-11 14:17:19 -07:00
Unknown W. Brackets 779a52e08a Don't forget tex alpha if only a mip has none.
Mip levels should only move toward unknown.
2014-05-04 09:54:53 -07:00
raven02 abc5c86339 Split out texture level 2014-04-19 06:45:17 +08:00