minetest/games/devtest/mods/testnodes
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
..
models Add performance test nodes, using complex meshes. (#13161) 2023-07-30 14:53:08 +01:00
textures Faster blit_with_alpha() (#14448) 2024-03-19 19:56:47 +01:00
commands.lua DevTest: /test_place_node skips dummy/cb nodes 2022-10-23 21:58:56 +02:00
drawtypes.lua Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073) 2024-01-17 17:47:06 +01:00
init.lua Add performance test nodes, using complex meshes. (#13161) 2023-07-30 14:53:08 +01:00
light.lua DevTest: Explain purpose of most items in tooltips (#12833) 2022-10-09 08:05:22 -04:00
liquids.lua Fix liquid falling if in "float" group (#13789) 2024-02-12 23:24:54 +01:00
meshes.lua Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073) 2024-01-17 17:47:06 +01:00
mod.conf Add bumpmapping and parallax occlusion testing nodes to devtest (#9242) 2020-10-09 19:13:42 +01:00
nodeboxes.lua Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073) 2024-01-17 17:47:06 +01:00
overlays.lua DevTest: Add nodes and items for testing overlays (#12304) 2022-05-27 21:39:36 +02:00
param2.lua Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073) 2024-01-17 17:47:06 +01:00
performance_test_nodes.lua Add performance test nodes, using complex meshes. (#13161) 2023-07-30 14:53:08 +01:00
properties.lua Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
README.md Rename “Minimal development test” to “Development Test” (#9928) 2020-05-26 00:17:52 +02:00
textures.lua Faster blit_with_alpha() (#14448) 2024-03-19 19:56:47 +01:00

Test Nodes

This mod contains a bunch of basic nodes to test development stuff. Most nodes are kept as minimal as possible in order to show off one particular feature of the engine, to make testing stuff easier.

This mod includes tests for:

  • drawtypes
  • paramtype2's
  • node properties such as damage, drowning, falling, etc.
  • other random stuff