ZWrite

From Resonite Wiki
Revision as of 06:23, 5 April 2020 by imported>A Monsoon of Babies (Marked this version for translation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ZWrite is a property found on material components which controls how they are rendered. Frooxius described the property as the following:

"ZWrite determines if the material writes its value to the depth buffer (also Z-buffer). Writing into the depth buffer prevents anything that's behind that material from rendering in front. Typically you don't want to change the behavior. Opaque materials almost always use ZWrite, since you can't see anything behind them, transparent ones typically don't, because it could cause other objects behind them to not show. However because of that it's not possible to properly sort two transparent materials, so in some cases it might render through another object that's in front of it. That's because all transparent materials are instead distance sorted by their center. RenderQueue is related, because it determines the main order in which the materials render. If you have something transparent with higher queue, it will always render on top of other transparent things (but not behind ZWrite materials rendered before it)."