pex-renderer
pex-renderer copied to clipboard
[glTF] alphaMode blend sets depthWrite to false in loaders
Why?
I think it's because if transparent geometries write to depth buffer they would occlude each other? We would need some for of order independent transparency for it to work.
Yes, glTF spec says it is implementation dependent:
BLEND - Support for this mode varies. There is no perfect and fast solution that works for all cases. Client implementations should try to achieve the correct blending output for as many situations as possible. Whether depth value is written or whether to sort is up to the implementation. For example, implementations may discard pixels that have zero or close to zero alpha value to avoid sorting issues.