jMonkeyEngine-Contributions / Lemur

Lemur is a jMonkeyEngine-based UI toolkit.
http://jmonkeyengine-contributions.github.io/Lemur/
BSD 3-Clause "New" or "Revised" License
116 stars 32 forks source link

Properly clear the alpha discard param in IconComponent & QuadBackgroundComponent #115

Open Ali-RS opened 1 year ago

Ali-RS commented 1 year ago

This should properly clean up the alpha discard param in QuadBackgroundComponent and IconComponent when alpha discard is disabled (is set to 0).

pspeed42 commented 1 year ago

99% sure that setting alphaDiscardThreshold to 0 is equivalent of disabling it... ie: any of the in-shader ifdefs will be false and so on.

Ali-RS commented 1 year ago

I just followed up based on your comment below that said it is an oversight to not "clear" it.

https://hub.jmonkeyengine.org/t/lemur-iconcomponent-issue-with-transparent-icons/45257/10?u=ali_rs

I do not have much knowledge about shaders (but 0 meaning "not-defined" sounds weird to me though) but anyway If you think these changes are not required then please feel free to close the PR.

By the way, thanks for the response

pspeed42 commented 1 year ago

Ahah. So I'm just trying to be thorough. I'll try to incorporate this the next time I do a pre-release pass. Thanks for the contribution.