aframe-slice9-component
aframe-slice9-component copied to clipboard
Introduce alphaTest attribute
This PR introduces alphaTest (number)
attribute to the component.
Currently the component seems to use alpha blend for cutting off the four corners. But for that purpose using alpha test would be more efficient. And (my understanding is) the area cut by alpha test doesn't write depth so it would be better for render order issues (Related: https://github.com/mozilla/hubs/pull/4470).
But Cons is non-antialiasing. So alphaTest: false, transparent: true
by default would be good for the quality. Users can opt-in/out on their ends depending on their applications.
I support this PR. I currently stumbled over the exact same issue that the corners are cutting a hole into the object behind it when the viewangle isn't right.