-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Improve texture modifier documentation #16753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Work based on docs.luanti.org, thanks to @appgurueu
d8ca450 to
97ed4f0
Compare
| texture to the maximum value (255). | ||
|
|
||
| As the red, green and blue channels aren't premultiplied with alpha in PNGs, | ||
| this might reveal hidden colors of otherwise transparent portions of an image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this affects other operations like [invert, too. Perhaps make this a general comment with a suitable link to e.g. https://en.wikipedia.org/wiki/Alpha_compositing (not sure if that is a good resource, though).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the documentation already implies that texture modifiers "stack" so I don't see a need to update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be missing something, but I think [noalpha is not the only modifier capable of changing pixel alpha from zero to a non zero value. IIUC [invert can do it, too, if mode contains a. And those modifiers (not sure if there are more) could benefit from a similar comment.
|
Addressed your comments. So my recommended use of |
This PR updates the texture modifier documentation by making it somewhat more accurate and precise.
Work based on https://docs.luanti.org/for-creators/api/texture-modifiers/, the texts are basically copied from there with minor changes. Thanks to @appgurueu.
(Ideally, it would have been better if those changes would have gone to
lua_api.mdfirst, but … oh well)To do
How to test
Read the changes. ;-)