minetest/src/client
HybridDog cda112493a
Faster blit_with_alpha() (#14448)
* Add test nodes for alpha compositing and the fill texture modifier

Texture test nodes can be helpful to test if `blit_with_alpha` works correctly.

The alpha compositing test node covers different cases where pixel colors are mixed with each other.
The test currently fails because `blitPixel` does not work correctly if a semi-transparent color
is drawn on top of another semi-transparent color.
The test nodes for the fill texture modifier show if the size and position arguments of the modifier work correctly.
They do not cover special cases such as very large or negative position or size values.

* Faster blit_with_alpha()

The `blit_with_alpha` function has a noticeable effect on the time it takes to join a game.

To reduce the join times, I replace the `blit_with_alpha` function with a new one:
* It does not uses floating-point numbers.
* It directly operates on the raw pixel data instead of using the comparatively
  slow `setPixel` and `getPixel` functions from Irrlicht.
  Only ECF_A8R8G8B8 base images are supported now.
  If the top image does not have the ECF_A8R8G8B8 color format, it is converted;
  I assume that this happens rarely.
* There are case distinctions for fully opaque, fully transparent and semi-transparent pixels.
  This empirically increases the performance since the mixing between two semi-transparent happens rarely.
* The new function no longer has the `src_pos` argument since it was always the zero vector.
* The function is only documented once where it is declared.

For backwards compatibility, `blit_with_alpha` still mixes colors without gamma correction.
`blit_with_alpha` nonetheless behaves slightly different than before:
If a semi-transparent pixel is drawn on top of another semi-transparent pixel,
the color is mixed in a way which we can consider to be more correct now.
2024-03-19 19:56:47 +01:00
..
meshgen Delete clang-format files and comments (#14079) 2023-12-15 10:23:44 +01:00
render Allow shaders with disabled post processing pipeline (#14338) 2024-02-15 08:25:33 -08:00
shadows Improve ergonomics of CachedShaderSetting 2024-02-29 17:20:49 +01:00
sound Use AL_SOFT_direct_channels_remix extension for non-positional stereo sounds (#14195) 2024-01-03 21:57:00 +01:00
CMakeLists.txt Split up tile.cpp/h 2024-03-03 15:52:05 +01:00
activeobjectmgr.cpp Custom data structure for active objects to get performance *and* safety (#13880) 2024-01-17 20:04:56 +01:00
activeobjectmgr.h ActiveObjectMgr fixes (#13560) 2023-10-09 17:13:04 +02:00
camera.cpp Fix more type promotion mistakes 2024-02-26 22:07:40 +01:00
camera.h Split up tile.cpp/h 2024-03-03 15:52:05 +01:00
client.cpp Fix attached sounds stopping if objects are removed serverside (#14436) 2024-03-06 20:36:02 +01:00
client.h Fix attached sounds stopping if objects are removed serverside (#14436) 2024-03-06 20:36:02 +01:00
clientenvironment.cpp VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
clientenvironment.h Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
clientevent.h No damage effects on hp_max change (#11846) 2022-06-11 20:00:40 +02:00
clientlauncher.cpp Remove excessive touchscreengui.h includes (#14466) 2024-03-17 14:59:50 +01:00
clientlauncher.h VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
clientmap.cpp Fix clang-tidy type promotion errors 2024-02-26 20:47:47 +01:00
clientmap.h Replace clientmap's MeshBufListList with a hashmap 2024-01-03 21:56:38 +01:00
clientmedia.cpp Introduce `std::string_view` into wider use (#14368) 2024-02-17 15:35:33 +01:00
clientmedia.h Bypass media transfer in single player 2024-02-04 21:23:05 +01:00
clientobject.cpp ActiveObjectMgr fixes (#13560) 2023-10-09 17:13:04 +02:00
clientobject.h ActiveObjectMgr fixes (#13560) 2023-10-09 17:13:04 +02:00
clientsimpleobject.h Move clientsimpleobject.h to client folder (#9630) 2020-04-10 20:10:51 +02:00
clouds.cpp VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
clouds.h VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
content_cao.cpp Split up tile.cpp/h 2024-03-03 15:52:05 +01:00
content_cao.h Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
content_cso.cpp Remove excessive touchscreengui.h includes (#14466) 2024-03-17 14:59:50 +01:00
content_cso.h Move client-specific files to 'src/client' (#7902) 2018-11-28 20:01:49 +01:00
content_mapblock.cpp Decouple MeshMakeData from Client 2024-02-22 15:45:17 +00:00
content_mapblock.h Const correctness 2024-02-22 15:45:17 +00:00
event_manager.h Fix some potential iterator invalidation issues 2024-02-16 12:34:40 +01:00
filecache.cpp Introduce `std::string_view` into wider use (#14368) 2024-02-17 15:35:33 +01:00
filecache.h Introduce `std::string_view` into wider use (#14368) 2024-02-17 15:35:33 +01:00
fontengine.cpp Enforce limits of settings that could cause buggy behaviour (#12450) 2022-07-09 22:32:08 +02:00
fontengine.h Fully remove bitmap font support (#11863) 2022-01-08 14:53:25 +01:00
game.cpp Item meta pointing range (#14347) 2024-03-17 15:55:38 +01:00
game.h Rework client connecting and enable fallback address use 2024-01-07 21:49:05 +01:00
gameui.cpp Move hard coded minimap to builtin (#14071) 2024-02-07 20:13:23 +01:00
gameui.h Move hard coded minimap to builtin (#14071) 2024-02-07 20:13:23 +01:00
guiscalingfilter.cpp Formspec: prevent infinite loop caused by negative background9[] size (#13624) 2023-07-07 21:42:10 +02:00
guiscalingfilter.h FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453) 2022-07-03 08:52:26 -04:00
hud.cpp VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
hud.h TouchScreenGUI: Fix only 9 hotbar slots being usable (#13698) 2023-08-24 17:45:51 +02:00
imagefilters.cpp Refactor tile.cpp/h parts except texturesource.cpp 2024-03-03 15:52:05 +01:00
imagefilters.h Split up tile.cpp/h 2024-03-03 15:52:05 +01:00
inputhandler.cpp Touchscreen: Fix virtual joystick sometimes going backwards 2024-03-17 15:00:37 +01:00
inputhandler.h Remove excessive touchscreengui.h includes (#14466) 2024-03-17 14:59:50 +01:00
joystick_controller.cpp Fix clang-tidy type promotion errors 2024-02-26 20:47:47 +01:00
joystick_controller.h Simulate all keys being released when when game loses focus (#13336) 2023-04-13 18:06:21 +02:00
keycode.cpp Allow toggling touchscreen mode at runtime (#14075) 2024-02-22 15:44:49 +00:00
keycode.h Allow toggling touchscreen mode at runtime (#14075) 2024-02-22 15:44:49 +00:00
keys.h Add a key to toggle map block bounds (#11172) 2021-04-20 19:23:31 +02:00
localplayer.cpp Move PlayerSettings class to client code 2024-03-06 18:03:57 +01:00
localplayer.h Move PlayerSettings class to client code 2024-03-06 18:03:57 +01:00
mapblock_mesh.cpp Split up tile.cpp/h 2024-03-03 15:52:05 +01:00
mapblock_mesh.h Split up tile.cpp/h 2024-03-03 15:52:05 +01:00
mesh.cpp Return texture filter settings to previous state 2023-11-29 21:09:21 +01:00
mesh.h Clean up texture filtering settings (#13683) 2023-08-24 10:50:47 +02:00
mesh_generator_thread.cpp Decouple MeshMakeData from Client 2024-02-22 15:45:17 +00:00
mesh_generator_thread.h Decouple MeshMakeData from Client 2024-02-22 15:45:17 +00:00
minimap.cpp VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
minimap.h Fix minimap textures overwrite (#14349) 2024-02-15 21:52:41 +01:00
mtevent.h Move mtevent.h to src/client/ 2024-01-26 22:10:36 +01:00
particles.cpp Enable IPO/LTO by default except for debug builds (#14198) 2024-02-09 00:01:12 +01:00
particles.h Split up tile.cpp/h 2024-03-03 15:52:05 +01:00
renderingengine.cpp VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
renderingengine.h VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
shader.cpp VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
shader.h Split up tile.cpp/h 2024-03-03 15:52:05 +01:00
sky.cpp VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
sky.h VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
sound.cpp Add sound volume when unfocused setting (#14083) 2023-12-10 19:11:39 +01:00
sound.h Add sound volume when unfocused setting (#14083) 2023-12-10 19:11:39 +01:00
texturepaths.cpp Refactor tile.cpp/h parts except texturesource.cpp 2024-03-03 15:52:05 +01:00
texturepaths.h Refactor tile.cpp/h parts except texturesource.cpp 2024-03-03 15:52:05 +01:00
texturesource.cpp Faster blit_with_alpha() (#14448) 2024-03-19 19:56:47 +01:00
texturesource.h Split up tile.cpp/h 2024-03-03 15:52:05 +01:00
tile.cpp Refactor tile.cpp/h parts except texturesource.cpp 2024-03-03 15:52:05 +01:00
tile.h Refactor tile.cpp/h parts except texturesource.cpp 2024-03-03 15:52:05 +01:00
wieldmesh.cpp VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00
wieldmesh.h VBO-related optimizations and improvements (#14395) 2024-02-29 17:20:57 +01:00