Open JirkaDellOro opened 2 months ago
This is the intended behaviour for now.
I made this change to support glTF Alpha Coverage alphaMode: MASK
("The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value". I also added an alphaClip
(alpha cutoff value) property to the Material.
With the current sortForAlpha
and alphaClip
we can support all glTF alphaModes
:
OPAQUE
: sortForAlpha: false; alphaClip: 0MASK
: sortForAlpha: false; alphaClip: 0-1BLEND
: sortForAlpha: true; alphaClip: 0However i am not pleased with the current situation:
sortForAlpha
now means more than what it says. We need to find fitting names for our properties.alphaClip
is a Material property, sortForAlpha
is a ComponentMaterial property. This is confusing, both should be properties of the same class. (In both three.js aswell as Unity these options seem to purely belong to a Material)
Introduced with
Date: Mon Jul 08 2024 15:22:45 GMT+0200 (Central European Summer Time) disable blending for opaque objects
Is this the desired behaviour? sortForAlpha now means more than what it says...