minetest/games/devtest/mods
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
..
basenodes Optimize PNG files (#13509) 2023-10-09 17:13:44 +02:00
basetools Add wear bar color API (#13328) 2024-02-02 21:21:00 +01:00
benchmarks Implement get_node with a get_node_raw (#14384) 2024-03-03 15:53:23 +01:00
broken Add no_texture.png as fallback for unspecified textures 2021-10-20 21:50:16 +02:00
bucket Devtest: Extend tooltips of many items and tools (#10312) 2020-09-04 20:50:03 +02:00
callbacks DevTest: Cleanup callback logging 2022-10-23 21:58:56 +02:00
chest Inventory: Fix order of callbacks when swapping items 2024-03-16 20:14:05 +01:00
chest_of_everything Android: Add field_enter_after_edit[] formspec element (#13836) 2023-10-01 11:20:50 +02:00
dignodes DevTest: Explain purpose of most items in tooltips (#12833) 2022-10-09 08:05:22 -04:00
give_initial_stuff DevTest: chest_of_everything mod: Add search, bag, improve formspec (#13064) 2023-01-09 21:40:41 +01:00
initial_message Debundle Minetest Game (#13818) 2023-11-07 22:18:26 +01:00
lighting Remove trailing whitespace (#13505) 2023-05-18 20:34:18 +02:00
log DevTest: Move more logging to log mod 2022-10-23 21:58:56 +02:00
mapgen Devtest game: Update biome registrations (#9936) 2020-05-26 23:11:33 +01:00
modchannels Rename “Minimal development test” to “Development Test” (#9928) 2020-05-26 00:17:52 +02:00
soundstuff Sound refactor and improvements (#12764) 2023-06-16 20:15:21 +02:00
stairs DevTest: Explain purpose of most items in tooltips (#12833) 2022-10-09 08:05:22 -04:00
testentities Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
testfood DevTest: Explain purpose of most items in tooltips (#12833) 2022-10-09 08:05:22 -04:00
testformspec Optimize PNG files (#13509) 2023-10-09 17:13:44 +02:00
testfullscreenfs Add touch_controls boolean to get_player_window_information() (#14092) 2023-12-17 20:47:07 +01:00
testhud Add function to get all HUD elements (#14042) 2024-01-14 17:46:29 +01:00
testitems Item meta pointing range (#14347) 2024-03-17 15:55:38 +01:00
testnodes Faster blit_with_alpha() (#14448) 2024-03-19 19:56:47 +01:00
testpathfinder Devtest: Extend tooltips of many items and tools (#10312) 2020-09-04 20:50:03 +02:00
testtools Add Lua API function to resolve node/collision/selection boxes (#13964) 2024-02-06 20:45:16 +01:00
tiled Fix plantlike_rooted world-aligned node base textures (#12994) 2022-12-12 08:45:09 -05:00
unittests Try to preserve metatable when exchanging data with the async env (#14369) 2024-03-06 18:04:49 +01:00
util_commands Add wear bar color API (#13328) 2024-02-02 21:21:00 +01:00