pex-renderer icon indicating copy to clipboard operation
pex-renderer copied to clipboard

[glTF] alphaMode blend sets depthWrite to false in loaders

Open dmnsgn opened this issue 1 year ago • 1 comments

Why?

dmnsgn avatar May 02 '24 13:05 dmnsgn

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.

vorg avatar May 02 '24 14:05 vorg

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.

dmnsgn avatar Jul 02 '25 14:07 dmnsgn