mirror of
https://github.com/storytold/craft-libs.git
synced 2026-12-01 02:36:54 +01:00
In mask mode the cutoff now tests the material's alpha (factor times texture) without the layer opacity, and a fragment that passes is drawn with the layer opacity alone. Before, a passing fragment kept its fractional alpha while it wrote depth in the opaque pass, so the clear color showed through where the surface behind it should. This follows glTF 2.0 alpha coverage and storytold/effectcraft#4075. Shadow maps follow the same rule: a masked caster tests the material's alpha against its cutoff, a material alpha of 0 passes a cutoff of 0, and a masked caster with an opacity below 0.5 casts no shadow, as an opaque-mode caster does. The EffectCraft copy used by the differential tests carries #4075's change, and the README describes the masked output and the remaining caster differences.