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 Rydgård
65153b55fa
Never detach shaders as some drivers may have broken semantics. May help #6294
...
(you're supposed to be able to detach them after link)
2014-06-12 08:58:14 +02:00
Henrik Rydgard
339c4d7dc3
Fix a bunch of typos breaking various utility shaders on GLES
...
Fixes white shadows in FF-Type 0 on Tegra, as mentioned in #6268
2014-06-09 19:15:45 +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
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 Rydgård
fe58f8daa9
Merge pull request #6254 from unknownbrackets/framebuf-clamp
...
Correct framebuf clamping, tex projection from framebuf
2014-06-08 11:22:38 +02:00
Henrik Rydgard
4b9823c0ea
Let's see if there are any remaining fog INF/NAN issues out there
2014-06-08 11:06:34 +02:00
Unknown W. Brackets
da438b7c68
Fix clamping to the correct texel.
...
This fixes things when edges bleed in from a larger framebuffer. We need
to clamp to the internal texels of the range.
2014-06-07 19:30:46 -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
580143e5e2
Disable vertex arrays before depal as well.
2014-05-31 22:07:42 -07:00
Unknown W. Brackets
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. Brackets
4b978ed6f9
Apply unsupported blending modes in the shader.
...
This handles unsupported fixed color combinations, alpha doubling, etc.
Where possible, tries to avoid it - it means using a blit (without the
framebuffer fetch extension), which can slow things down a lot with tons
of drawcalls.
2014-05-27 01:45:17 -07:00
Unknown W. Brackets
e80c63945a
Make sure to gen the frag shader matching the id.
...
Otherwise, the frag shader might be generated accounting for different
vertexFullAlpha values, or otherwise won't match up with the id, since we
change flags between the two Apply calls.
2014-05-04 16:31:57 -07:00
Henrik Rydgard
16f4622ac7
Remove cached light variables to reduce work when parsing DLs.
...
Also removes some duplication between GL and the inactive D3D code.
2014-04-21 12:51:19 +02:00
Henrik Rydgard
f2f0355d94
Split up ApplyShader into ApplyVertexShader and ApplyFragmentShader.
...
Will allow the alphatest avoiding optimization later.
2014-03-24 10:55:07 +01:00
Henrik Rydgard
63aeb31e07
Attempt workaround for fog issue #5384
2014-03-22 23:49:14 +01:00
Unknown W. Brackets
473fb866e6
softgpu: Implement vertex preview.
...
And move ConvertMatrix4x3To4x4() into a common place since there were
differing implementations, which was only confusing.
2013-12-29 13:45:10 -08:00
Henrik Rydgård
b2d0f37d96
Fix crashing on some OpenGL versions
2013-12-18 12:00:23 +01:00
Henrik Rydgard
a8a48013f6
Don't use gl_FragColor when deprecated
2013-12-16 23:18:13 +01:00
raven02
71d2ce3731
Replace -ve fogcoef[1] with -10000.0f
2013-12-16 22:45:21 +08:00
Henrik Rydgard
214cc01976
Fix bugs in stencil2alpha, fix bugs in glsl 3 support, enable dual source blending where available
...
The stencil2alpha bug fixes fix some glows in Wipeout, dual source fixes the rest.
2013-12-15 12:49:13 +01:00
Henrik Rydgård
b784daf424
Check for INF in fog coef, replace with large value. See #2387
2013-12-09 14:56:29 +01:00
Henrik Rydgard
628bf497dd
Hopefully fix UV scaling properly this time.
...
Check the faces in Hexyz Force please.
2013-12-08 11:52:20 +01:00
Henrik Rydgard
39b632b279
Copy the stencil value in REPLACE mode to fragment alpha (but only when it's safe)
...
This is cheap but incomplete.
To do it more "right", we need multipass when blending or alpha test is enabled, ugh. That's for later.
Anyway, this improves the glow situation in Wipeout somewhat. Still lots of stuff that glows that shouldn't, but a little less overwhelmingly bright.
2013-12-03 00:13:21 +01:00
raven02
b00495f1e5
Not using factor in texture coords mapping mode
2013-12-01 16:04:29 +08:00
Henrik Rydgard
c42ee6d12e
oops
2013-11-30 19:09:27 +01:00
Henrik Rydgard
eea8413a82
Make the texcoord speedhack a bit less aggressive at eliminating uvscaleoffset uniform updates.
...
Should fix #4688 and the new problem in #2919 while keeping Frontier Gate Boost working.
2013-11-30 15:54:20 +01:00
raven02
4d14f88455
Alternative consistent fix
2013-11-26 11:34:33 +08:00
raven02
a8d9796010
Fix texture cord in HW T&L
2013-11-25 21:07:30 +08:00
Henrik Rydgard
e3d471f590
Fix issues with texturing from render targets with prescaled UV (texcoord speed hack)
2013-11-19 23:38:36 +01:00
Henrik Rydgård
67ca4419fe
Fix minor bug where we didn't clear dirtyUniforms if early-outing from UpdateUniform.
2013-11-13 10:02:58 +01:00
Henrik Rydgard
54217deb16
Speed up UpdateUniforms a little
2013-11-12 17:06:03 +01:00
Henrik Rydgård
0471a8c886
Only set fogdepth to highp on PowerVR. May fix #4333
2013-10-28 15:38:25 +01:00
Henrik Rydgard
80702109f5
Move gpu vendor detection to native with the rest of the gl init.
...
Also disable vertical layout for mainscreen entirely.
2013-10-16 00:48:44 +02:00
Unknown W. Brackets
85c013c5b6
Fix a crash in OpenGL on game shutdown.
2013-10-12 01:39:50 -07:00
Henrik Rydgård
ae94e5c078
Must reset lastShader after swtiching shaders outside the "framework".
2013-10-10 20:11:57 +02:00
Henrik Rydgard
4c2c015774
Expose the experimental "bPrescaleUV" as "Texture Coord Speedhack"
...
It's actually quite beneficial in some games, can substantially reduce
glUniform4fv calls.
Also throw in a second shot at glDrawRangeElements.
2013-10-08 22:59:40 +02:00
Henrik Rydgard
7a0b1e40c6
Update native (making GLES3 features possible on desktop). Minor optimization.
2013-10-08 21:50:43 +02:00
Henrik Rydgård
0a4750909e
Try to avoid unnecessary calls to glEnable/DisableVertexAttribArray
2013-10-08 17:47:47 +02:00
Henrik Rydgård
4b019bfcbb
Remove '_' from attribute names as Adreno hates them in glBindAttribLocation.
...
Sigh.
Also remove some logging.
2013-10-08 17:26:33 +02:00
Henrik Rydgård
0ecac31abd
Use glBindAttribLocation to simplify shader usage a little.
2013-10-08 17:18:59 +02:00
Henrik Rydgard
f645988b8f
More precision annotations in shader generators, other microoptimizations
2013-10-07 20:15:00 +02:00
Henrik Rydgard
9dc9c89918
Possible fix to bezier texture coordinate problem reported by CPkmn
2013-09-23 22:02:58 +02:00
Henrik Rydgard
01def3b6cc
Missed these
2013-09-21 23:44:11 +02:00
Henrik Rydgard
82e5787bbe
Preparation for proper spline/bez: Convert control points to a simple format.
...
The bezier/spline code will no longer need to handle morph and splines,
when it's finally written. This is done by pre-skinning in software and
pre-decoding to get rid of the morph.
2013-09-21 23:37:14 +02:00
Unknown W. Brackets
abe805b62a
Prevent a buffer overflow on bad shader.
2013-09-17 08:40:20 -07:00
Unknown W. Brackets
ca1168df3c
Enable the G3D log on Windows by default.
2013-09-07 13:43:07 -07:00
Henrik Rydgard
8c88dff5a4
More log categories, use them (and existing ones). Improve log config.
2013-09-07 22:02:55 +02:00
Henrik Rydgard
55aa3d13c7
Win32: Switch to a UNICODE build. This took quite a bit of fixing.
2013-08-26 19:00:16 +02:00
Unknown W. Brackets
7f6cf3ec29
Add a few gstate accessors for texture type stuff.
2013-08-24 11:34:37 -07:00