diff options
author | Samuel Sieb <samuel@sieb.net> | 2016-04-02 23:35:42 -0700 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2016-04-03 04:24:28 -0400 |
commit | 01ae43c48009f816f4649fae2f7f6997452aa6cf (patch) | |
tree | 678b3c87ea040cf240d9e1b31e510e6d9f52c37e /doc | |
parent | 66af984e0ec90eb58b21f7eb48641cd638dffdca (diff) | |
download | minetest-01ae43c48009f816f4649fae2f7f6997452aa6cf.tar.gz minetest-01ae43c48009f816f4649fae2f7f6997452aa6cf.tar.bz2 minetest-01ae43c48009f816f4649fae2f7f6997452aa6cf.zip |
Add an option to colorize to respect the destination alpha
Also, rework the colorizing code to be more efficient.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index a01e72889..4a4e345a9 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -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 ------ |