I think TBDR should be disabled when gl_FragDepth is written in Fragment Shader.
TBDR cannot be disabled, as it is the architecture of the hardware (i.e. it is part of the hardware chips design, so is impossible to change).
gl_FragDepth is not supported in OGLES 2.0 (the only shader based OGLES API currently available), but if this feature was available in the API, the TBDR architecture would be capable of resolving it.
gl_FragDepth is not supported in OGLES 2.0 (the only shader based OGLES API currently available), but if this feature was available in the API, the TBDR architecture would be capable of resolving it.
No. Where gl_FragDepth is available, writing to it works as expected.
No. Where gl_FragDepth is available, writing to it works as expected.
No, rendering is always tile-based and shader evaluation is deferred as much as possible. Writing gl_FragDepth just means that the fragment shader may have to be evaluated earlier than normal.
No, rendering is always tile-based and shader evaluation is deferred as much as possible. Writing gl_FragDepth just means that the fragment shader may have to be evaluated earlier than normal.
Output to gl_FragDepth is fed back to the ISP stage, hidden surfaces will still be removed. But of course the ISP cannot perform the depth test before the fragment depth is known.
regarding “Output to gl_FragDepth is fed back to the ISP stage”, so it is possible for one pixle to go through the Fragment Shader twice, the first time is to caculate gl_FragDepth and feed back to ISP, after ISP, it will again go through the following stages including Fragment Shader. Is this right? thanks.
The fragment won’t be processed a second time.
When it is processed (the first and only time), the colour is calculated and stored in the on-chip colour buffer. The visibility information that is known once the fragment has been processed is given back to the ISP so the on-chip depth and stencil buffers can be updated accordingly.