performance_test_nodes.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. -- Performance test mesh nodes
  2. local S = core.get_translator("testnodes")
  3. -- Complex mesh
  4. core.register_node("testnodes:performance_mesh_clip", {
  5. description = S("Performance Test Node") .. "\n" .. S("Marble with 'clip' transparency"),
  6. drawtype = "mesh",
  7. mesh = "testnodes_marble_glass.obj",
  8. tiles = {"testnodes_marble_glass.png"},
  9. paramtype = "light",
  10. use_texture_alpha = "clip",
  11. groups = {dig_immediate=3},
  12. })
  13. -- Complex mesh, alpha blending
  14. core.register_node("testnodes:performance_mesh_blend", {
  15. description = S("Performance Test Node") .. "\n" .. S("Marble with 'blend' transparency"),
  16. drawtype = "mesh",
  17. mesh = "testnodes_marble_glass.obj",
  18. tiles = {"testnodes_marble_glass.png"},
  19. paramtype = "light",
  20. use_texture_alpha = "blend",
  21. groups = {dig_immediate=3},
  22. })
  23. -- Overlay
  24. core.register_node("testnodes:performance_overlay_clip", {
  25. description = S("Performance Test Node") .. "\n" .. S("Marble with overlay with 'clip' transparency") .. "\n" .. S("Palette for demonstration"),
  26. drawtype = "mesh",
  27. mesh = "testnodes_marble_metal.obj",
  28. tiles = {"testnodes_marble_metal.png"},
  29. overlay_tiles = {{name = "testnodes_marble_metal_overlay.png", color = "white"}},
  30. paramtype = "light",
  31. paramtype2 = "color",
  32. palette = "testnodes_palette_metal.png",
  33. color = "#705216";
  34. use_texture_alpha = "clip",
  35. groups = {dig_immediate=3},
  36. })
  37. -- Overlay
  38. core.register_node("testnodes:performance_overlay_blend", {
  39. description = S("Performance Test Node") .. "\n" .. S("Marble with overlay with 'blend' transparency") .. "\n" .. S("Palette for demonstration"),
  40. drawtype = "mesh",
  41. mesh = "testnodes_marble_metal.obj",
  42. tiles = {"testnodes_marble_metal.png"},
  43. overlay_tiles = {{name = "testnodes_marble_metal_overlay.png", color = "white"}},
  44. paramtype = "light",
  45. paramtype2 = "color",
  46. palette = "testnodes_palette_metal.png",
  47. color = "#705216";
  48. use_texture_alpha = "blend",
  49. groups = {dig_immediate=3},
  50. })