I just noticed (reading the GL Spec), that the current way Horde handles the Shader's ZFunc is causing issues for us.
In a shader I set states to:
Code:
ZWriteEnable = true;
ZFunc = Always;
Maybe not a common use-case but this should be valid, I think.
Unfortunately Horde does a short cut and when seeing ZFunc=Always, it disables the depth test, and this disables updates to the depth buffer.
According to the spec:
Quote:
4.1.6 Depth Buffer Test
The depth buffer test discards the incoming fragment if a depth comparison fails. The comparison is enabled or disabled with the generic Enable and Disable commands using the symbolic constant DEPTH TEST. When disabled, the depth comparison and subsequent possible updates to the depth buffer value are bypassed and the fragment is passed to the next operation
Of course disabling the depth test and hence not writing to the depth buffer is an optimization, so maybe we a ZFunc=None could replace the current Always and disable the test, while "ZFunc=Always" uses glDepthFunc(GL_ALWAYS).
Any suggestions?