Commit Graph

2972 Commits

Author SHA1 Message Date
deve
7a82a8d2c6 Fixed compiler warning 2016-10-05 10:56:40 +02:00
deve
bd42f2c2df Fixed rare case that anisotropic filtering feature is not available in graphics drivers. 2016-10-05 10:50:20 +02:00
Benau
78e6cfc8db Merge remote-tracking branch 'origin/master' into walldriving 2016-10-03 10:03:12 +08:00
auria.mg
6e37c5375a Fix end camera crash 2016-10-02 20:18:40 -04:00
deve
1a3daafbff Fixed exit on startup when force legacy device is set in graphics restrictions.
It was working on Linux, but on Windows we need to clear system messages when closing irrlicht device.
2016-09-23 10:22:56 +02:00
Benau
54bf37c09b Make camera works better in upside down area 2016-09-20 10:51:51 +08:00
Benau
eeac5668d9 Rename QuadGraph to DriveGraph, make it use the new Graph interface 2016-09-17 14:30:28 +08:00
Deve
f2d354d759 Fixed graphics restrictions on android 2016-09-17 03:55:50 +02:00
Deve
852cc068d3 Restore SSAO on linux with GLES renderer. 2016-09-17 03:55:50 +02:00
Deve
21d62ed405 Check availability of color buffer float extension in GLES renderer 2016-09-17 03:55:50 +02:00
Deve
d05cff09c8 Add a graphics restriction for BGRA format on android.
It causes issues with particles transparency.
2016-09-17 03:55:50 +02:00
Benau
fff0bab42a Merge remote-tracking branch 'origin/master' into walldriving 2016-09-16 09:23:18 +08:00
auria.mg
7c2642d427 Workaround crash 2016-09-15 21:12:01 -04:00
Benau
061f187142 Make slipstream work in upside down track 2016-09-13 15:07:07 +08:00
Benau
3f86722181 Fix skid mark on wall surface 2016-09-13 11:48:36 +08:00
Deve
b0c0af8c46 Check if drivers support BGRA texture format and fallback to RGBA 2016-09-11 22:35:54 +02:00
Deve
fb1c049906 Fixed skybox in GLES renderer 2016-09-10 00:17:47 +02:00
Deve
37f3a8e19e Fixed RTTs formats in GLES renderer.
The problem is that textures with float internal formats can be used in framebuffers only when some extensions are available. This is a basic functionality and we need something that is supported on all drivers. As far as I tested, the basic integer GL_RGBA8 format works fine.

Another problem is with GL_BGRA format. The extension with GL_BGRA support is available for almost every device and irrlicht is able to load all textures from files (it has a fallback mode anyway), but when it's used as a texture for framebuffer, it produces a black screen. Again it works fine with GL_RGBA format.

The only issue that is not fixed is SSAO rendering. It uses linear depth rtt, which has GL_R32F type and which can't be easily changed to something other. I disabled SSAO for now, because it is too slow for embedded devices anyway.

I didn't change anything in original OpenGL 3.x rendering, so everything should work as before.
2016-09-09 23:56:22 +02:00
Deve
278d985632 Disable rtt that is not used in GLES renderer anyway 2016-09-09 22:23:01 +02:00
Deve
f2d1eb7117 Use high precision floating point variables if possible.
On desktop medium and high precision is generally the same, at least for mesa drivers. But on some Android devices medium precision is much worse, which causes artifacts. We need high precision float variables in vertex shaders for proper scene rendering. Setting different precision for fragment and vertex shaders seems to be not possible, so we just set it to high for both shader types when it's available.
2016-09-07 22:43:11 +02:00
Benau
23a49d5245 Merge remote-tracking branch 'origin/master' into walldriving 2016-09-04 11:56:28 +08:00
Benau
21dc569f70 Start to clean up quad and graph node 2016-09-04 11:56:03 +08:00
Benau
78baaff23e Fix crash in profile mode 2016-09-03 23:03:14 +00:00
deve
6c9050f47a Merge branch 'master' of https://github.com/supertuxkart/stk-code 2016-08-26 10:36:09 +02:00
deve
5abc047b0c Declare precision also in vertex shaders in GLES renderer.
Some drivers complain that it was declared only in fragment shaders.
2016-08-26 10:35:48 +02:00
Deve
790634a914 Use proper size for RSM framebuffer when scale rtts parameter is set.
It looks that only RSM visualization was affected.
2016-08-20 23:34:12 +02:00
Deve
150e40e4e8 Break the loop with glClientWaitSync also when GL_CONDITION_SATISFIED is returned.
The GL_CONDITION_SATISFIED says that the sync was signaled before the timeout expired. In this case there is no reason to make another glClientWaitSync execution.
2016-08-20 09:31:29 +02:00
Deve
c7d970b745 Allow to set ForceLegacyDevice in graphics restrictions 2016-08-20 08:13:17 +02:00
Benau
6b0fe9dd89 Clean up:
Try to use forward enum declaration for KartRenderType

NoCopy for RenderInfo
2016-08-18 11:15:05 +08:00
Benau
fa39de691e Fix Release build 2016-08-17 12:08:20 +08:00
Benau
f07452842d Add support for colorizing library objects using material.xml only 2016-08-17 11:57:18 +08:00
Deve
bd6ad544cc Fixed bloom with scale_rtts_factor parameter. 2016-08-15 08:46:02 +02:00
Deve
d320df749f Allow to set max texture size in config file.
It gives much lower memory usage when it's set for example to 128.
2016-08-12 23:30:10 +02:00
Deve
5cfed1bc1c Allow to set lower RTTs resolution.
It allows to increase performance on devices that have only one available resolution.

It also allows to draw GUI elements in full resolution while rendering the scene with slightly lower resolution, which gives you few additional FPS.

Note that particles don't work as expected yet with this feature.
2016-08-11 02:04:35 +02:00
hiker
ba3497bb81 Properly set the camera type in the constructor (which previously
was always 'CM_TYPE_NORMAL'). Fixes #2576.
2016-07-25 17:45:24 +10:00
Benau
d9e0d0d458 Fix #2580 2016-07-25 10:18:11 +08:00
Rob Clark
ce38df268b couple small performance optimizations (#2578)
* pass timeout to driver, rather than unconditional 1ms sleep

This way if the fence is signalled earlier, we can get on with life
sooner.

* optimize displacement bind/clear/render

Stop thrashing render targets, and group things together into single
render-passes.  And only bind/clear if we will actually draw.
2016-07-22 20:29:42 -04:00
Benau
e02a25f8f5 Use bold font for billboard text 2016-07-19 13:13:31 +08:00
Benau
b2ee606e7b Try to use float for dest_ret 2016-07-19 12:25:16 +08:00
Benau
6a319cbed2 Clean up old font code 2016-07-18 23:00:40 +08:00
Benau
05419cd555 Initial work on new font rendering engine 2016-07-18 16:03:11 +08:00
Benau
9fd6fd2673 Fix crashes when using the uninitialized layer 8 texture 2016-07-15 15:23:17 +08:00
Benau
1d6c7fa60f Remove vector int in RenderInfo 2016-07-15 12:31:00 +08:00
Benau
8408a7c158 Merge remote-tracking branch 'origin/master' into colorful_track_object 2016-07-15 09:27:59 +08:00
Deve
93fc20e275 Merge OpenGL ES renderer branch
It adds support for OpenGL ES renderer, which is needed for Android port and for running STK on other embedded devices such as Raspberry Pi.

Currently it works in two ways:
- Shader-based pipeline, which requires OpenGL ES 3.0 (Android >= 4.3)
- Fallback to irrlicht-based fixed pipeline that needs OpenGL ES 2.0. The fixed pipeline generally works, but it is affected by the same issues as our OpenGL 2.1 fixed pipeline renderer.

I tried to modify our OpenGL renderer as little as possible to avoid regressions. The only one major change is that we are now using the "#stk_include" directive in shaders instead of linking multiple shaders into one program.

Currently it works only on linux. The Android port needs some refactoring. In theory it should be possible to make it working on Windows, but we would need some OpenGL ES SDK, or maybe modified libglew.

At this stage it is playable with current mesa drivers. I tested it on intel graphics card and I didn't notice any issues.

On Android only the OpenGL ES 2.0 renderer with fixed pipeline  has been tested for now.
2016-07-14 20:54:30 +02:00
Deve
eea30b3197 Handle glDebugMessageCallback extension in better way for OpenGL ES 2016-07-14 20:34:43 +02:00
Deve
8f8acdcef3 Remove android related code part2.
Again, it will be handled in different branch and hopefully with curl and sounds support.
2016-07-14 19:50:34 +02:00
Benau
53374176ad First try to support colorization texture mask 2016-07-15 00:53:22 +08:00
auria.mg
1463cf9344 Fix uninitialized variables, fixes #2567 2016-07-12 19:39:44 -04:00
Deve
81b471be1f More proper solution for glDrawElementsBaseVertex function 2016-07-12 23:34:31 +02:00