|
|
|
|
|
by RomainGuy
4940 days ago
|
|
Android does not use the depth buffer. The UI toolkit draws back to front. We are thinking about ways to improve this but most apps draw blended primitives back to front. An optimization I want to get in is to resort the render tree to batch commands by type and state. A side effect of this will be the ability to cull invisible primitives. The stencil is not used at the moment (well... that's actually how overdraw debugging is implemented) because the hardware renderer only support rectangular clipping regions and thus relies on the scissor instead. Given how the original 2D API was designed, using the stencil buffer for clipping could eat up quite a bit of bandwidth or require a rather complex implementation. It is planned to start using the stencil buffer to support non-rectangular clipping regions but this will have a cost. Remember that the GPU rendering pipeline was written for an API that was never designed to run on the GPU and some obvious optimizations applied to traditional rendering engines do not necessarily apply. |
|
This means that, at least on traditional forward rendering GPUs (Nvidia, Adreno), overdraw is full cost even for pixels covered by opaque views. Do the PowerVR chips still get effectively-zero opaque overdraw from their tile-based-deferred-rendering approach?
Meanwhile, I'm not totally clear how hidden surface removal works on Mali chips. They use TBDR, but still recommend drawing front-to-back to avoid overdraw http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc....