Commit graph

154 commits

Author SHA1 Message Date
Henrik Rydgard
c91b58ac8e Fix typo. This breaks it again though, strangely. 2015-08-26 16:07:11 +02:00
Henrik Rydgard
fee776b6e0 Correct scale factors for through mode depth rounding. 2015-08-26 15:55:58 +02:00
Henrik Rydgard
9e18fb7e90 Round Z in the vertex shader to match a 16-bit Z buffer.
However this inexplicably does still not solve the Phantasy Star issue!
2015-08-26 15:25:21 +02:00
Henrik Rydgard
a5fb4cffd5 Failed quick attempt at Z rounding in the vshader 2015-08-26 15:25:20 +02:00
Unknown W. Brackets
04eb83002c Assume lmode does nothing in throughmode. 2015-03-08 18:03:17 -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
Henrik Rydgard
df62bc42b7 D3D shader generator: Fix an issue with 4x3 vs 4x4 matrices that caused warnings to be reported (I think).
Make the GL code for this case (skinning without normal) more similar.
2015-01-12 20:37:33 +01: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
e2d2950865 Add a sanity check for shader linking, active in debug mode 2014-12-14 20:17:29 +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
81592e9cf5 gles: Avoid pow(<= 0, 0) entirely, undefined.
Should work on more driver versions.  Fixes #6941.
2014-09-23 23:59:32 -07:00
Unknown W. Brackets
6f38c21ccc d3d9: Make the vertex shaders more similar. 2014-09-20 23:55:48 -07:00
Henrik Rydgard
37e3cf362f Move vertexdecoder files into GPU/Common 2014-09-12 02:00:32 +02:00
Henrik Rydgard
1f9c1719e3 Delete the DX9 vertex decoder, use the "GL" one instead (now common) 2014-09-12 02:00:32 +02:00
Henrik Rydgard
34b5a1c2f3 Disable precision qualifiers on desktop GL 2014-06-10 22:44:53 +02:00
Unknown W. Brackets
ed39bb7a9c When projecting textures, flip V in frag shader.
Slower, but this way we actually project correctly.
2014-06-07 19:32:19 -07:00
Unknown W. Brackets
0950e7b86d Optimize ComputeVertexShaderID() a bit.
This is only like 1%.  Along the way found and fixed an overlap of bits.
2014-03-29 10:35:09 -07:00
raven02
2c7c1f547d Shade mapping fix 2014-03-06 22:07:08 +08:00
Unknown W. Brackets
2e91adc607 Oops, revert software transform breakage.
It will deal with getting the coords right, including in projection modes.
2014-01-18 15:44:04 -08:00
Unknown W. Brackets
6eb493a842 Use 0 for texcoord when not specified in vertex.
Can't find any other unprotected attributes (well, position, but that
should always be specified) so this fixes #5133.

Also fixes #5124 for me.
2014-01-18 14:57:25 -08:00
Henrik Rydgård
5dbc26aec8 Merge pull request #4937 from unknownbrackets/gpu-minor
Ignore material update when no vertex color, softgpu vertex preview
2013-12-29 13:49:24 -08:00
Unknown W. Brackets
25bc394284 Ignore the material update flag w/o vertex color.
Instead of using materialambient for all of them.

Fixes #3918, and seems to match tests with 3dstudio.
2013-12-29 12:57:30 -08:00
Henrik Rydgård
64717d1b02 Shaders: Make sure to always use matching versions.
Really should unify this somehow.
2013-12-29 12:27:19 +01:00
Henrik Rydgard
0a1514161d GLSL 3.0 fix 2013-12-18 11:22:31 +01:00
Henrik Rydgard
832c933cb8 Some shader fixes 2013-12-17 23:38:58 +01: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 Rydgard
3cde4921ae Have the shader generators generate modern GLSL if available.
This opens up to use other modern features like dual source alpha later.
2013-12-15 11:23:27 +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
95d5c28720 Fix bug where we scaled UV coordinates twice when a tex matrix was used. 2013-12-04 14:20:42 +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
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
4d3e57d6eb Move normal reversion into the vertex shader instead of the decoder. 2013-11-02 11:05:31 +01:00
Henrik Rydgård
0471a8c886 Only set fogdepth to highp on PowerVR. May fix #4333 2013-10-28 15:38:25 +01:00
Unknown W. Brackets
ac027fac81 Fix missing uniform for GE_TEXMAP_TEXTURE_MATRIX. 2013-10-24 21:59:44 -07:00
Henrik Rydgard
5d47aabb08 Seems we need high precision for fog on PowerVR. #4287 might be fixed by this. 2013-10-22 19:56:06 +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 Rydgard
f645988b8f More precision annotations in shader generators, other microoptimizations 2013-10-07 20:15:00 +02:00
raven02
7f3a3ccd6c Projection mapping : Initialize z as 1.0f 2013-10-01 09:01:38 +08: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
raven02
8ccaa733b9 Use and applu new bool , doShadeMapping 2013-09-14 14:29:37 +08:00
raven02
ef2399d5b3 Use GE state accessor more often : gstate.isSkinningEnabled() 2013-09-14 14:11:25 +08:00
Unknown W. Brackets
0e82ecca86 Fix lighting when lightpos and spec coef are 0.
Zero to the power of zero is mathematically undefined, NVIDIA chokes but
AMD seems to accept it.  Not well tested on Android.

Fixes #2424.
2013-09-01 03:11:02 -07:00
Unknown W. Brackets
7f6cf3ec29 Add a few gstate accessors for texture type stuff. 2013-08-24 11:34:37 -07:00
Henrik Rydgård
d9897719b7 Merge pull request #3260 from raven02/patch-8
Treat light type 3 as GE_LIGHTTYPE_SPOT
2013-08-20 05:13:26 -07:00