From 83229921e5f378625d9ef63ede3dffbe778e1798 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 17 Jan 2021 01:56:50 +0100 Subject: Rework use_texture_alpha to provide three opaque/clip/blend modes The change that turns nodeboxes and meshes opaque when possible is kept, as is the compatibility code that warns modders to adjust their nodedefs. --- doc/lua_api.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index cfc150edc..8156f785a 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -4386,6 +4386,8 @@ Utilities object_step_has_moveresult = true, -- Whether get_velocity() and add_velocity() can be used on players (5.4.0) direct_velocity_on_players = true, + -- nodedef's use_texture_alpha accepts new string modes (5.4.0) + use_texture_alpha_string_modes = true, } * `minetest.has_feature(arg)`: returns `boolean, missing_features` @@ -7340,10 +7342,18 @@ Used by `minetest.register_node`. -- If the node has a palette, then this setting only has an effect in -- the inventory and on the wield item. - use_texture_alpha = false, - -- Use texture's alpha channel - -- If this is set to false, the node will be rendered fully opaque - -- regardless of any texture transparency. + use_texture_alpha = ..., + -- Specifies how the texture's alpha channel will be used for rendering. + -- possible values: + -- * "opaque": Node is rendered opaque regardless of alpha channel + -- * "clip": A given pixel is either fully see-through or opaque + -- depending on the alpha channel being below/above 50% in value + -- * "blend": The alpha channel specifies how transparent a given pixel + -- of the rendered node is + -- The default is "opaque" for drawtypes normal, liquid and flowingliquid; + -- "clip" otherwise. + -- If set to a boolean value (deprecated): true either sets it to blend + -- or clip, false sets it to clip or opaque mode depending on the drawtype. palette = "palette.png", -- The node's `param2` is used to select a pixel from the image. -- cgit v1.2.3