mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add embedded PNG texture modifier (#11498)
This commit is contained in:
parent
fe5cb2cdfb
commit
02292e03e4
3 changed files with 126 additions and 35 deletions
|
@ -628,6 +628,23 @@ Result is more like what you'd expect if you put a color on top of another
|
|||
color, meaning white surfaces get a lot of your new color while black parts
|
||||
don't change very much.
|
||||
|
||||
#### `[png:<base64>`
|
||||
|
||||
Embed a base64 encoded PNG image in the texture string.
|
||||
You can produce a valid string for this by calling
|
||||
`minetest.encode_base64(minetest.encode_png(tex))`,
|
||||
refer to the documentation of these functions for details.
|
||||
You can use this to send disposable images such as captchas
|
||||
to individual clients, or render things that would be too
|
||||
expensive to compose with `[combine:`.
|
||||
|
||||
IMPORTANT: Avoid sending large images this way.
|
||||
This is not a replacement for asset files, do not use it to do anything
|
||||
that you could instead achieve by just using a file.
|
||||
In particular consider `minetest.dynamic_add_media` and test whether
|
||||
using other texture modifiers could result in a shorter string than
|
||||
embedding a whole image, this may vary by use case.
|
||||
|
||||
Hardware coloring
|
||||
-----------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue