mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Real global textures (#6105)
* Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal
This commit is contained in:
parent
6bab695479
commit
75320e7e88
26 changed files with 469 additions and 160 deletions
|
@ -284,11 +284,19 @@ on top of `cobble.png`.
|
|||
|
||||
### Advanced texture modifiers
|
||||
|
||||
#### `[crack:<n>:<p>`
|
||||
#### Crack
|
||||
* `[crack:<n>:<p>`
|
||||
* `[cracko:<n>:<p>`
|
||||
* `[crack:<t>:<n>:<p>`
|
||||
* `[cracko:<t>:<n>:<p>`
|
||||
|
||||
Parameters:
|
||||
* `<t>` = tile count (in each direction)
|
||||
* `<n>` = animation frame count
|
||||
* `<p>` = current animation frame
|
||||
|
||||
Draw a step of the crack animation on the texture.
|
||||
`crack` draws it normally, while `cracko` lays it over, keeping transparent pixels intact.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -4420,12 +4428,21 @@ Definition tables
|
|||
* `"image.png"`
|
||||
* `{name="image.png", animation={Tile Animation definition}}`
|
||||
* `{name="image.png", backface_culling=bool, tileable_vertical=bool,
|
||||
tileable_horizontal=bool}`
|
||||
tileable_horizontal=bool, align_style="node"/"world"/"user", scale=int}`
|
||||
* backface culling enabled by default for most nodes
|
||||
* tileable flags are info for shaders, how they should treat texture
|
||||
when displacement mapping is used
|
||||
Directions are from the point of view of the tile texture,
|
||||
not the node it's on
|
||||
* align style determines whether the texture will be rotated with the node
|
||||
or kept aligned with its surroundings. "user" means that client
|
||||
setting will be used, similar to `glasslike_framed_optional`.
|
||||
Note: supported by solid nodes and nodeboxes only.
|
||||
* scale is used to make texture span several (exactly `scale`) nodes,
|
||||
instead of just one, in each direction. Works for world-aligned
|
||||
textures only.
|
||||
Note that as the effect is applied on per-mapblock basis, `16` should
|
||||
be equally divisible by `scale` or you may get wrong results.
|
||||
* `{name="image.png", color=ColorSpec}`
|
||||
* the texture's color will be multiplied with this color.
|
||||
* the tile's color overrides the owning node's color in all cases.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue