Depth-write egg-tags

I’ve encountered something odd: in at least some cases, a depth-write tag set within an egg-file doesn’t seem to take effect.

Specifically, I have an egg-file that, within a given object’s “”-entry, includes a tag along the following lines:
<Scalar> depth-write { 0 }

However, when this object is loaded into PView, depth-writing seems to still be active, and getting a hierarchy-listing shows that there are no depth-attribs present.

Here below is a simple egg-file that displays the problem on my machine. It includes a cube that should have depth-writing disabled, and a quad that should not. Further, the cube and quad are both placed into the “fixed” bin, with a draw-order that should result in the plane being drawn second.

To test, just load the model into PView, activate lighting (so that the cube is visible against the quad), and examine the result: if depth-writing is disabled on the cube, it should be over-drawn by the quad.

untitled.egg (2.9 KB)

It confuses me.

Known pipe types:
(all display modules loaded.)

Warning in /c/Users/sereg/Downloads/untitled.egg at line 32, column 30:
    <Scalar> depth-write { 0 }
Unknown depth-write mode 0

Ah, you’re right–I’d missed that completely! ^^;

Which led me to the correct value: As we’ve seen, “0” doesn’t work. A quick test showed that neither does “False”.

But, based on something tangentially-related in the Egg Syntax page, I tried “OFF”–and it worked!

So thank you for pointing me in the right direction! :slight_smile:

1 Like