1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Add an option to colorize to respect the destination alpha

Also, rework the colorizing code to be more efficient.
This commit is contained in:
Samuel Sieb 2016-04-02 23:35:42 -07:00 committed by kwolekr
parent 66af984e0e
commit 01ae43c480
2 changed files with 56 additions and 16 deletions

View file

@ -357,8 +357,13 @@ The mask is applied using binary AND.
#### `[colorize:<color>:<ratio>`
Colorize the textures with the given color.
`<color>` is specified as a `ColorString`.
`<ratio>` is an int ranging from 0 to 255, and specifies how much of the
color to apply. If ommitted, the alpha will be used.
`<ratio>` is an int ranging from 0 to 255 or the word "`alpha`". If
it is an int, then it specifies how far to interpolate between the
colors where 0 is only the texture color and 255 is only `<color>`. If
omitted, the alpha of `<color>` will be used as the ratio. If it is
the word "`alpha`", then the alpha of the color will be multiplied with
the alpha of the texture with the RGB of the color replacing the RGB of
the texture.
Sounds
------