Commit Graph
175 Commits
Author SHA1 Message Date
Henrik Rydgard f4248cb550 Remove a whole lot of flipping special cases 2015-11-02 20:07:30 +01:00
Unknown W. Brackets 5595d1278d Merge pull request #8103 from hrydgard/d3d-shader-id
D3D: Generate shaders from shader IDs, just like in GL
2015-10-24 21:19:34 -07:00
Henrik Rydgard 85229efef4 D3D9: Generate shaders directly from shader IDs, just like we do in GL. 2015-10-25 00:34:23 +02:00
Henrik Rydgard b86394d0a6 Minor bugfixes in vtx shader gen 2015-10-25 00:08:46 +02:00
Henrik Rydgard 92389a4966 Use a common ShaderId class. Start moving shader ID code to GPU/Common 2015-10-24 23:24:06 +02:00
Henrik Rydgard 67cd018aca Rename shader bits to not clash (this is preparation for other changes) 2015-10-24 23:09:28 +02:00
Henrik Rydgard 3c82dc1462 vtxshader: Don't enable full lighting if only shadeMapping is enabled. Should help #8071 2015-10-24 22:59:36 +02:00
Henrik Rydgard c63ed2f701 Improve vertex shader description 2015-10-24 10:41:14 +02:00
Henrik Rydgard 285480f992 More shader bit organization, viewer 2015-10-14 20:23:51 +02:00
Henrik Rydgard 4e26561d78 Fix bug in hardware skinning, improve shader viewer 2015-10-14 20:17:12 +02:00
Henrik Rydgard 1308a90fd1 More shader viewer improvements 2015-10-14 20:04:44 +02:00
Henrik Rydgard 0b46b6b43a Improvements to shader viewer 2015-10-14 19:50:39 +02:00
Henrik Rydgard 7f4e473e8c Add new shader viewing tool 2015-10-14 18:10:21 +02:00
Henrik Rydgard 09cc80f413 Don't skip lights that are being used for shade mapping when generating vertex shader IDs 2015-10-14 18:01:40 +02:00
Henrik Rydgard f4d50feacb Reduce the number of shaders generated by games that juggle a lot of lights, like Tekken 6 2015-10-14 17:56:36 +02:00
Henrik Rydgård 87f45ed307 OpenGL: Generate vertex shaders directly from the shader ID. 2015-10-14 10:50:29 +02:00
Henrik Rydgard b07b002040 Introduce "Compatibility Flags".
These should be used very restrictively, see comment in Compatibility.h.

Should help #8004, by disabling depth rounding in Fight Night round 3.
2015-09-27 01:23:20 +02:00
Unknown W. Brackets 764539f814 Clean up GLES logic used in shader gen. 2015-09-05 16:44:17 -07:00
Henrik Rydgard d89da71057 Get rid of a division in the vertex shader by precomputing the inverse. 2015-08-26 17:40:06 +02:00
Henrik Rydgard 5dbc8abd94 experiment: Add a different offset that unknown found during testing, plus remove rounding of through mode depth (which should already be rounded) 2015-08-26 17:28:34 +02:00
Henrik Rydgard dedd2b60e4 Subtracting an offset of 0.5 works on my nVidia and I have no idea why, this makes no sense. 2015-08-26 17:02:07 +02:00
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