mirror of
https://github.com/minetest/minetest.git
synced 2025-07-04 08:50:22 +02:00
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.
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user