Commit Graph

23 Commits

Author SHA1 Message Date
Benau
9aae773e91 Use absolute path when caching 2018-01-22 01:09:58 +08:00
Benau
390554eca1 Add xml shader and the loader 2018-01-21 13:19:00 +08:00
Benau
0f95d36dbc Add proper sharing and deletion of shader files 2018-01-19 14:41:33 +08:00
Benau
24308ced03 Remove features in SP that give no performance boost at all
gl_Layer in vertex shader, bindless and array textures
2018-01-13 14:49:33 +08:00
Benau
6071d2f983 Remove all unused / unstable opengl-related code 2018-01-12 13:04:40 +08:00
Benau
54c7914cb5 Update graphical restrictions
Mesa 17.4 will use the correct normalization forumla

Disable GLSL on intel HD2000 / HD3000 due to broken opengl 3.3 support
2018-01-08 15:55:28 +08:00
Benau
7797115867 Add SP for correct normal and easier shader system 2017-12-25 14:00:10 +08:00
Benau
6a79d204c1 Don't use SSBO for skinning
It causes trouble in hd5670 in windows
2017-10-22 01:31:15 +08:00
Benau
e61eb3415a Remove hardcoded max 1024 bones for skinning 2017-10-20 17:10:08 +08:00
Benau
553b2439ac Allow using SSBO for skinning if supported 2017-10-20 01:27:44 +08:00
Benau
88e15147b8 Merge remote-tracking branch 'origin/win-64bit' 2017-10-17 00:55:22 +08:00
Deve
ae4e302741 Add a way to run STK without srgb framebuffer 2017-10-09 21:18:15 +02:00
hiker
f3d56b37df Merge branch 'master' into win-64bit 2017-08-16 17:29:57 +10:00
Deve
d44802a482 Add a workaround for some qualcomm devices on android 4.4 2017-07-11 00:37:31 +02:00
hiker
f2138e062d Tried to fix all 64-bit related compiler warnings triggered from files
in graphics.
2017-04-08 23:25:33 +10:00
Deve
a7f0d3762c Some fixes for GLES renderer.
- Don't use BGRA format at all. It doesn't work with non-typical cases (i.e. with srgb or compressed textures) and also casues artifacts on some android devices. I kept the extension in central settings, but it probably won't be used.
- Use sRGB texture format when advanced lighting is enabled. This makes it closer to the original OpenGL renderer and also avoids to have even more #ifdef's for sRGB conversions.
- Keep RGBA textures for non-advanced lighting to make it simpler.

Now advanced lighting in GLES looks almost the same as in OpenGL 3.x (without shadows/GI)
2017-03-25 22:23:46 +01:00
Deve
5931e20f8b Use highp precision qualifier.
For OpenGL 3.x renderer it only matters for some buggy drivers (i.e old AMD driver that complains about missing precision qualifier). Based on specification is should have no effect and was added for compatibility with GL ES.

In our case vertex and fragment must have the same precision because we use common header for both shader types and the precision for uniform variables must match.
Also "precision highp float;" is defined by default for both vertex and fragment shaders, so it seems to be more proper.

This will hopefully solve the problem with nvidia driver that tries to use f16vec4 instead of just vec4, see:
https://forum.freegamedev.net/viewtopic.php?f=17&t=7397&sid=06682ddb05ee9fbf48a2984d0bd48d5b
2017-03-24 22:21:09 +01:00
Deve
4ef8ec3af2 Fixed a warning in shaders compilation 2017-03-21 19:42:53 +01:00
Deve
583b858860 Handle #stk_include in better way.
It allows to use it recursively.
2017-03-21 18:41:18 +01:00
Deve
28d85d7ba3 Use explicit attrib location when the extension is available.
It allows to enable it easily in GLES renderer. And we check if this extension is available anyway because it's needed for shadows, so we can use it for other shaders too.
2017-02-01 21:58:10 +01:00
Daniel Butum
d0229cd85e Separate the non-cached shader loading in ShaderFilesManager 2016-12-18 13:40:36 +02:00
Benau
7ea4f30824 Make sure no duplicated shader is added somewhere else 2016-12-18 13:49:58 +08:00
Benau
2a9656bfdc Allow all shader files to be loaded only once
Todo: preload
2016-12-18 10:51:05 +08:00