Commit graph

85 commits

Author SHA1 Message Date
Henrik Rydgard
6a9e6ce5fe Simplify vertex shaders a little more in the common case of directional lights. 2013-06-24 00:29:30 +02:00
Henrik Rydgard
916184d2f4 Optimize the most common light type, directional, by doing the normalization beforehand. May shorten some shaders below Mali's limit with luck. 2013-06-20 23:30:21 +02:00
Henrik Rydgard
e7097ca95a Fall back to software transform when hardware transform fails. Should help Mali devices.
This is done per shader so the speed hit should not be as bad as turning hw transform off entirely.
Displays a red error at the top of the screen so that we don't trigger this accidentally.
2013-06-06 10:09:37 +02:00
Unknown W. Brackets
d3e488400c Multiply by the base color in ambient lighting.
JPCSP seems to do it this way.  Fixes #1692, and makes it consistent with
specular and diffuse, which seems right.
2013-06-04 22:54:19 -07:00
King_DuckZ
61500281a9 Warning fix on Intel compiler. 2013-05-30 15:42:11 +02:00
King_DuckZ
1455452850 Trailing whitespaces removed. 2013-05-30 15:42:11 +02:00
jeid3
fc38cfe798 Fix VertexShaderGenerator Command line for Gpu last generation on ios (hwXform) 2013-05-28 17:53:43 +02:00
Henrik Rydgard
cdef31f9fc Turn off the use of uniform arrays in shaders as some devices don't like them, and the speedup seems to be very small if any. 2013-05-26 14:03:02 +02:00
Henrik Rydgard
7ffdac39bc Disable the for loop in the vertex shader again. Some lame drivers don't seem to like it. 2013-05-23 12:49:34 +02:00
Henrik Rydgard
e2024674a4 Undo an optimization that broke skinning a bit... 2013-05-22 19:49:58 +02:00
Henrik Rydgard
199907b9ed Shader simplification - well, more of it. Hopefully this helps the mali problems a bit more. 2013-05-22 15:52:10 +02:00
Henrik Rydgard
29ab5e7801 Shader simplification: Flip skinning math around. Remove a temporary from the texcoord generation code. Update ffmpeg submodule pointer. 2013-05-20 00:16:29 +02:00
Henrik Rydgard
d9ed61c04a Shader simplification: Get rid of some uniforms when possible. 2013-05-19 16:38:52 +02:00
Henrik Rydgard
063e23dc0d Shader simplification: Share even more variables between lights. 2013-05-19 14:45:56 +02:00
Henrik Rydgard
a1d549c59f Shader simplification: Share some variables between lights to help bad register allocators 2013-05-19 14:36:07 +02:00
Henrik Rydgard
0ff8be1b1a Shader simplification: Get rid of lightSum1 when not needed. 2013-05-19 14:23:17 +02:00
Henrik Rydgard
b3cc5859dc Shader simplification: Get rid of lightscale where possible 2013-05-19 13:52:47 +02:00
Henrik Rydgard
06e4441213 Shader simplification: .rgb += instead of vec4(..., 0.0f) 2013-05-19 13:51:46 +02:00
Henrik Rydgard
b1dd449f8f Remove accidentally-added extra "precision highp float" from vshader gen 2013-05-18 23:21:42 +02:00
Henrik Rydgard
1b210fab14 Use arrays and for loops in GLSL shaders for bone processing, to shrink the shaders which are becoming too big for some mobile GPUs. Might fix #1816. 2013-05-18 20:45:52 +02:00
Henrik Rydgard
dca2406374 Add more precision specifiers to vertex shader 2013-05-18 19:51:52 +02:00
Unknown W. Brackets
a0e6917ee8 If unspecified, default normal to 0, 0, 1.
Fixes Trails in the Sky buttons and improves Kingdom Hearts lighting.
2013-05-04 13:23:50 -07:00
Henrik Rydgard
6f23a56779 Remove use of setlocale() in Osk as I could not figure out the purpose, and it broke stuff.
If this is actually needed, please send a pull request adding it back, turning it off when not used, and also add an explanation in a comment.
2013-04-25 10:42:31 +02:00
Henrik Rydgard
1965775c5a Ugly workaround for locale issue breaking HW transform for some people 2013-04-24 23:30:09 +02:00
Henrik Rydgard
5f1ed03165 Revert "Merge pull request #1324 from cinaera/pullreq" as it seems to break stuff, needs more testing.
This reverts commit a265569928, reversing
changes made to 06999ae649.
2013-04-21 21:09:02 +02:00
Henrik Rydgard
dd0088e6b8 Fix strange offset of skinned meshes in HW transform (helmet outside body etc) 2013-04-20 23:37:07 +02:00
Henrik Rydgard
70bb4e1c85 Fudge GPU cycle estimates to let GoW runs fast and GTA smooth. See comments for the horrible details.
I hope this doesn't affect other games adversely.
2013-04-20 20:21:12 +02:00
BeaR
191199a8d0 Fix vertex shader compilation 2013-04-18 19:34:24 +02:00
BeaR
de7c1ef327 Correct ambient light 2013-04-18 17:36:20 +02:00
Henrik Rydgard
c04ce5a64e Implement projective texture mapping. It's not used a great deal but good to have. 2013-04-17 21:41:47 +02:00
BeaR
c9daf8df7b Cleanup and fix vertex shader 2013-04-16 19:01:18 +02:00
Henrik Rydgard
ea11c36091 Fix a vshader id bit collision, avoid color test when set to 'ALWAYS', zeroinitialize dls. 2013-04-15 22:57:54 +02:00
BeaR
f7739ccdc2 Apply attenuation to ambient light 2013-04-15 19:11:26 +02:00
raven02
fcba4d4df1 Simply and initialize lightscale%i/angle%i/distance%i 2013-04-11 21:49:44 +08:00
BeaR
fa3a1fbd52 Add support for spotlights 2013-04-09 18:26:06 +02:00
raven02
07a36f2384 HW T&L : clamp lightscale 2013-04-09 20:42:40 +08:00
Unknown W. Brackets
44b22bc6ff Fix shader compilation error. 2013-04-02 07:26:36 -07:00
BeaR
b3aa63f64f Modifying shade mapping in HW and SW 2013-04-02 12:24:22 +02:00
BeaR
da1b345cd4 HW T&L: Change unlitcolor initialization and cleanup fragmentshader formatting 2013-04-02 12:24:22 +02:00
raven02
6396324f57 Add few isEnabled() in GPUState for Alpha/Color/Lighting/Texture Test 2013-03-27 18:35:54 +08:00
Henrik Rydgard
41b862c689 warning fixes 2013-03-22 19:59:16 +01:00
raven02
49befb3d41 Flip in throughmode for HW T&L 2013-03-16 20:35:51 +08:00
Henrik Rydgard
fcfea6343a Add some lowp annotations to the vertex shader 2013-03-03 23:57:29 +01:00
raven02
d3413681e5 Fix texture stretched vertically in HW T&L 2013-02-20 20:32:18 +08:00
raven02
d1784ab9f6 Fix HW T&L crash in FF type-0 2013-02-15 22:49:13 +08:00
Henrik Rydgard
2301a3b49e Flip texcoord vertically when texturing from FBO to compensate for OpenGL coordinate systems 2013-02-15 00:31:39 +01:00
Unknown W. Brackets
74c2769ada Don't use an f suffix in GL shaders.
Error found in Hexyz Force.
2013-02-09 17:18:01 -08:00
Henrik Rydgard
356f5788e1 Fix more UV issues 2013-02-08 00:04:01 +01:00
Henrik Rydgard
8749ad0cb9 Warning fixes, very minor updates to shader generators. 2013-02-06 19:04:28 +01:00
Henrik Rydgard
5c5f6ef165 Fix error in vertex shader compiler - no uniform called u_matambient 2013-02-04 23:33:14 +01:00