Commit Graph

2998 Commits

Author SHA1 Message Date
Benau
cc3ff7cf9f Simplify calculation of transform 2016-10-26 09:08:10 +08:00
Benau
a38c8f0c19 Make billboard text display properly when viewing in any direction 2016-10-26 00:34:13 +08:00
auria.mg
8c0fe53ff2 Fix texture mirroring on alpha blend/test shaders. See #2167 2016-10-17 19:46:21 -04:00
auria.mg
513e32d9ff Fix bug that could cause reversible textures to be mirrorred twice when driving the track in reverse (see #2167) 2016-10-17 19:09:01 -04:00
Benau
caf095ed60 Add improvements from auria and devee 2016-10-17 09:13:07 +08:00
Benau
af223ddf24 Try to use sun color to determine custom alpha for ghost karts
This may need more adjustments, also add custom_alpha uniform float
to transparent fragment shader to remove duplicated shader
2016-10-17 01:03:10 +08:00
Benau
23a1b08efe Allow normal map karts to be used in ghost race
Also split ghost karts out of additive shader, so fixed issues like
"drivers are facing backwards", "water in abyss affects ghost karts"

Todo: maybe transparency depend on current track color?
2016-10-16 15:40:40 +08:00
Benau
1f8149f138 Merge remote-tracking branch 'origin/skinned_mesh_normal_map' 2016-10-15 15:25:20 +08:00
Benau
efb6b7431a Try to make skinned mesh work with normal map 2016-10-15 00:17:09 +08:00
Benau
e09fe6ff8a Fix memory leak of mesh tool 2016-10-13 14:08:58 +08:00
Benau
48e6128e12 Grab light in the correct place, fixed all leaking of lights 2016-10-12 11:48:50 +08:00
Benau
ddcf6fbb14 Fix memory leaking when changing resolution 2016-10-12 10:28:33 +08:00
Benau
b2cdc8c97e Fix memory leak of unicolor texture
Also try to hold them until the last moment, this may need some
testing.
2016-10-11 16:25:22 +08:00
Benau
ef7201cf51 Remove an unneeded line 2016-10-11 12:24:36 +08:00
Deve
850b23db1f Fixed setting viewport in multiplayer games.
It was broken in commit 5cfed1bc1c.

We mix irr_driver->getVideoDriver()->setViewPort() and glViewport(...) functions and thus the first one, which is executed during camera activation, in some cases doesn't work. It compares the viewport to values which has been set last time and thinks that nothing changed.

It only happens on single player (with single camera), so we just restore the viewport to fullscreen after scene rendering to workaround the issue.

Actually the problem was that it was set after camera activation, which overwrote proper values.

I also fixed SSAO, RSM and normals vizualization in multiplayer games.
2016-10-10 22:47:30 +02:00
Benau
8e2d7c5499 Fix memory leaks and uninitialized values of ShadowMatrices 2016-10-10 13:04:40 +08:00
Benau
d39f5e487b Don't set position and target of camera the same
Otherwise NAN will be calculated in ViewArea of camera
2016-10-10 13:04:40 +08:00
Benau
59edb96489 Fix warning when eliminate a kart in battle mode 2016-10-08 08:35:07 +08:00
deve
ce28d46d14 Merge branch 'master' of https://github.com/supertuxkart/stk-code 2016-10-05 11:30:22 +02:00
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
hiker
3506b7da2f Merge pull request #2615 from nado/warning-fix
Fixes warnings
2016-10-05 12:59:22 +11:00
hiker
8949e89809 Merge remote-tracking branch 'origin/master' into rewind
Fixed conflicts.
2016-10-05 08:21:10 +11:00
Nado
25a4aa565a Reduce variables scope when possible, based on the warnings reported by
cppcheck.
2016-10-04 08:55:01 +02:00
Nado
4c0b4d8078 Fixes -Wsign-compare
See #2613
2016-10-04 08:43:38 +02:00
hiker
84a3f5d8b2 Fixed compiler warnings. 2016-10-04 08:16:35 +11:00
hiker
9cf88ef874 Merge remote-tracking branch 'origin/master' into rewind.
Fixed conflicts.
2016-10-04 08:15:40 +11: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
hiker
a58cef4701 Smoothing the speed of a kart (necessary to reduce camera stutter)
results in difficult to reproduce physics. So maintain two speed
values: smoothed (for camera), and 'normal' (for everything else).
2016-09-27 08:42:05 +10: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