Add performance test nodes, using complex meshes. (#13161)

This commit is contained in:
doxygen-spammer 2023-07-30 15:53:08 +02:00 committed by GitHub
parent cc8280426f
commit 9f25378ddd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 4149 additions and 0 deletions

@ -4,6 +4,7 @@ dofile(path.."/drawtypes.lua")
dofile(path.."/meshes.lua") dofile(path.."/meshes.lua")
dofile(path.."/nodeboxes.lua") dofile(path.."/nodeboxes.lua")
dofile(path.."/param2.lua") dofile(path.."/param2.lua")
dofile(path.."/performance_test_nodes.lua")
dofile(path.."/properties.lua") dofile(path.."/properties.lua")
dofile(path.."/liquids.lua") dofile(path.."/liquids.lua")
dofile(path.."/light.lua") dofile(path.."/light.lua")

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,59 @@
-- Performance test mesh nodes
local S = minetest.get_translator("testnodes")
-- Complex mesh
minetest.register_node("testnodes:performance_mesh_clip", {
description = S("Performance Test Node") .. "\n" .. S("Marble with 'clip' transparency"),
drawtype = "mesh",
mesh = "testnodes_marble_glass.obj",
tiles = {"testnodes_marble_glass.png"},
paramtype = "light",
use_texture_alpha = "clip",
groups = {dig_immediate=3},
})
-- Complex mesh, alpha blending
minetest.register_node("testnodes:performance_mesh_blend", {
description = S("Performance Test Node") .. "\n" .. S("Marble with 'blend' transparency"),
drawtype = "mesh",
mesh = "testnodes_marble_glass.obj",
tiles = {"testnodes_marble_glass.png"},
paramtype = "light",
use_texture_alpha = "blend",
groups = {dig_immediate=3},
})
-- Overlay
minetest.register_node("testnodes:performance_overlay_clip", {
description = S("Performance Test Node") .. "\n" .. S("Marble with overlay with 'clip' transparency") .. "\n" .. S("Palette for demonstration"),
drawtype = "mesh",
mesh = "testnodes_marble_metal.obj",
tiles = {"testnodes_marble_metal.png"},
overlay_tiles = {{name = "testnodes_marble_metal_overlay.png", color = "white"}},
paramtype = "light",
paramtype2 = "color",
palette = "testnodes_palette_metal.png",
color = "#705216";
use_texture_alpha = "clip",
groups = {dig_immediate=3},
})
-- Overlay
minetest.register_node("testnodes:performance_overlay_blend", {
description = S("Performance Test Node") .. "\n" .. S("Marble with overlay with 'blend' transparency") .. "\n" .. S("Palette for demonstration"),
drawtype = "mesh",
mesh = "testnodes_marble_metal.obj",
tiles = {"testnodes_marble_metal.png"},
overlay_tiles = {{name = "testnodes_marble_metal_overlay.png", color = "white"}},
paramtype = "light",
paramtype2 = "color",
palette = "testnodes_palette_metal.png",
color = "#705216";
use_texture_alpha = "blend",
groups = {dig_immediate=3},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B