Is PolygonOffset applied when the depth test is off?
It is not obvious to figure out the answer by reading the spec (ES 2.0 section 3.5.2). On one hand, the spec doesn't mention the need for a depth test, and the polygon offset is described separately from the fragment processing stages. On the other hand, it says:
And later on:... units scales an implementation-dependent constant that relates to the usable resolution of the depth buffer.
Hence, the question rises: what if we don't have a depth buffer attached? Or, in particular, we just disabled it by setting the depth test to OFF? It's not only the issue of how the offset is computed in this case, but also - it's difficult to imagine a use-case for it.It is the smallest difference in window coordinate z values that is guaranteed to remain distinct throughout polygon rasterization and in the depth buffer.