diff options
| author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-28 13:48:33 +0100 |
|---|---|---|
| committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-28 13:48:33 +0100 |
| commit | eb6aca8b4a67ef55108231e71ff29a18a29bf5ae (patch) | |
| tree | f891914d25cae2cdaa24392381436a287340651e /games/devtest/mods/testnodes | |
| parent | 8de51dae97aa2fe6ea02e4cf437bfe2b2a38eb06 (diff) | |
| parent | f1d72d212a0661588be27003069abf4bd8092e55 (diff) | |
| download | dragonfireclient-eb6aca8b4a67ef55108231e71ff29a18a29bf5ae.tar.xz | |
Merged Minetest
Diffstat (limited to 'games/devtest/mods/testnodes')
| -rw-r--r-- | games/devtest/mods/testnodes/drawtypes.lua | 30 | ||||
| -rw-r--r-- | games/devtest/mods/testnodes/light.lua | 6 | ||||
| -rw-r--r-- | games/devtest/mods/testnodes/mod.conf | 1 | ||||
| -rw-r--r-- | games/devtest/mods/testnodes/textures.lua | 49 | ||||
| -rw-r--r-- | games/devtest/mods/testnodes/textures/testnodes_height_pyramid.png | bin | 0 -> 90 bytes | |||
| -rw-r--r-- | games/devtest/mods/testnodes/textures/testnodes_height_pyramid_normal.png | bin | 0 -> 239 bytes | |||
| -rw-r--r-- | games/devtest/mods/testnodes/textures/testnodes_parallax_extruded.png | bin | 0 -> 591 bytes | |||
| -rw-r--r-- | games/devtest/mods/testnodes/textures/testnodes_parallax_extruded_normal.png | bin | 0 -> 143 bytes |
8 files changed, 83 insertions, 3 deletions
diff --git a/games/devtest/mods/testnodes/drawtypes.lua b/games/devtest/mods/testnodes/drawtypes.lua index 6bf57fa37..b3ab2b322 100644 --- a/games/devtest/mods/testnodes/drawtypes.lua +++ b/games/devtest/mods/testnodes/drawtypes.lua @@ -145,6 +145,23 @@ minetest.register_node("testnodes:fencelike", { }) minetest.register_node("testnodes:torchlike", { + description = S("Torchlike Drawtype Test Node"), + drawtype = "torchlike", + paramtype = "light", + tiles = { + "testnodes_torchlike_floor.png", + "testnodes_torchlike_ceiling.png", + "testnodes_torchlike_wall.png", + }, + + + walkable = false, + sunlight_propagates = true, + groups = { dig_immediate = 3 }, + inventory_image = fallback_image("testnodes_torchlike_floor.png"), +}) + +minetest.register_node("testnodes:torchlike_wallmounted", { description = S("Wallmounted Torchlike Drawtype Test Node"), drawtype = "torchlike", paramtype = "light", @@ -162,6 +179,8 @@ minetest.register_node("testnodes:torchlike", { inventory_image = fallback_image("testnodes_torchlike_floor.png"), }) + + minetest.register_node("testnodes:signlike", { description = S("Wallmounted Signlike Drawtype Test Node"), drawtype = "signlike", @@ -514,10 +533,19 @@ local scale = function(subname, desc_double, desc_half) minetest.register_node("testnodes:"..subname.."_half", def) end +scale("allfaces", + S("Double-sized Allfaces Drawtype Test Node"), + S("Half-sized Allfaces Drawtype Test Node")) +scale("allfaces_optional", + S("Double-sized Allfaces Optional Drawtype Test Node"), + S("Half-sized Allfaces Optional Drawtype Test Node")) +scale("allfaces_optional_waving", + S("Double-sized Waving Allfaces Optional Drawtype Test Node"), + S("Half-sized Waving Allfaces Optional Drawtype Test Node")) scale("plantlike", S("Double-sized Plantlike Drawtype Test Node"), S("Half-sized Plantlike Drawtype Test Node")) -scale("torchlike", +scale("torchlike_wallmounted", S("Double-sized Wallmounted Torchlike Drawtype Test Node"), S("Half-sized Wallmounted Torchlike Drawtype Test Node")) scale("signlike", diff --git a/games/devtest/mods/testnodes/light.lua b/games/devtest/mods/testnodes/light.lua index 94409e83f..8ab4416d9 100644 --- a/games/devtest/mods/testnodes/light.lua +++ b/games/devtest/mods/testnodes/light.lua @@ -22,7 +22,8 @@ end -- Lets light through, but not sunlight, leading to a -- reduction in light level when light passes through minetest.register_node("testnodes:sunlight_filter", { - description = S("Sunlight Filter"), + description = S("Sunlight Filter") .."\n".. + S("Lets light through, but weakens sunlight"), paramtype = "light", @@ -35,7 +36,8 @@ minetest.register_node("testnodes:sunlight_filter", { -- Lets light and sunlight through without obstruction minetest.register_node("testnodes:sunlight_propagator", { - description = S("Sunlight Propagator"), + description = S("Sunlight Propagator") .."\n".. + S("Lets all light through"), paramtype = "light", sunlight_propagates = true, diff --git a/games/devtest/mods/testnodes/mod.conf b/games/devtest/mods/testnodes/mod.conf index 4824c6ed0..d894c3452 100644 --- a/games/devtest/mods/testnodes/mod.conf +++ b/games/devtest/mods/testnodes/mod.conf @@ -1,2 +1,3 @@ name = testnodes description = Contains a bunch of basic example nodes for demonstrative purposes, development and testing +depends = stairs diff --git a/games/devtest/mods/testnodes/textures.lua b/games/devtest/mods/testnodes/textures.lua index 6ffef8fe9..e0724c229 100644 --- a/games/devtest/mods/testnodes/textures.lua +++ b/games/devtest/mods/testnodes/textures.lua @@ -71,3 +71,52 @@ for a=1,#alphas do groups = { dig_immediate = 3 }, }) end + + +-- Bumpmapping and Parallax Occlusion + +-- This node has a normal map which corresponds to a pyramid with sides tilted +-- by an angle of 45°, i.e. the normal map contains four vectors which point +-- diagonally away from the surface (e.g. (0.7, 0.7, 0)), +-- and the heights in the height map linearly increase towards the centre, +-- so that the surface corresponds to a simple pyramid. +-- The node can help to determine if e.g. tangent space transformations work +-- correctly. +-- If, for example, the light comes from above, then the (tilted) pyramids +-- should look like they're lit from this light direction on all node faces. +-- The white albedo texture has small black indicators which can be used to see +-- how it is transformed ingame (and thus see if there's rotation around the +-- normal vector). +minetest.register_node("testnodes:height_pyramid", { + description = "Bumpmapping and Parallax Occlusion Tester (height pyramid)", + tiles = {"testnodes_height_pyramid.png"}, + groups = {dig_immediate = 3}, +}) + +-- The stairs nodes should help to validate if shading works correctly for +-- rotated nodes (which have rotated textures). +stairs.register_stair_and_slab("height_pyramid", "experimantal:height_pyramid", + {dig_immediate = 3}, + {"testnodes_height_pyramid.png"}, + "Bumpmapping and Parallax Occlusion Tester Stair (height pyramid)", + "Bumpmapping and Parallax Occlusion Tester Slab (height pyramid)") + +-- This node has a simple heightmap for parallax occlusion testing and flat +-- normalmap. +-- When parallax occlusion is enabled, the yellow scrawl should stick out of +-- the texture when viewed at an angle. +minetest.register_node("testnodes:parallax_extruded", { + description = "Parallax Occlusion Tester", + tiles = {"testnodes_parallax_extruded.png"}, + groups = {dig_immediate = 3}, +}) + +-- Analogously to the height pyramid stairs nodes, +-- these nodes should help to validate if parallax occlusion works correctly for +-- rotated nodes (which have rotated textures). +stairs.register_stair_and_slab("parallax_extruded", + "experimantal:parallax_extruded", + {dig_immediate = 3}, + {"testnodes_parallax_extruded.png"}, + "Parallax Occlusion Tester Stair", + "Parallax Occlusion Tester Slab") diff --git a/games/devtest/mods/testnodes/textures/testnodes_height_pyramid.png b/games/devtest/mods/testnodes/textures/testnodes_height_pyramid.png Binary files differnew file mode 100644 index 000000000..8c787b740 --- /dev/null +++ b/games/devtest/mods/testnodes/textures/testnodes_height_pyramid.png diff --git a/games/devtest/mods/testnodes/textures/testnodes_height_pyramid_normal.png b/games/devtest/mods/testnodes/textures/testnodes_height_pyramid_normal.png Binary files differnew file mode 100644 index 000000000..5ab7865f2 --- /dev/null +++ b/games/devtest/mods/testnodes/textures/testnodes_height_pyramid_normal.png diff --git a/games/devtest/mods/testnodes/textures/testnodes_parallax_extruded.png b/games/devtest/mods/testnodes/textures/testnodes_parallax_extruded.png Binary files differnew file mode 100644 index 000000000..7e1c32398 --- /dev/null +++ b/games/devtest/mods/testnodes/textures/testnodes_parallax_extruded.png diff --git a/games/devtest/mods/testnodes/textures/testnodes_parallax_extruded_normal.png b/games/devtest/mods/testnodes/textures/testnodes_parallax_extruded_normal.png Binary files differnew file mode 100644 index 000000000..b134699d0 --- /dev/null +++ b/games/devtest/mods/testnodes/textures/testnodes_parallax_extruded_normal.png |
