Optimizing 3D Graphics For Mobiles Mobiles Madan Kandula Director
Introduction • Cross-Platform games and apps using our engine – PlayStation VITA, PlayStation 3 – iOS (iPhone, iPad) – Android – Windows • Core expertise is real time 3D graphics – openGL + GLES2, DirectX • Provide custom graphic solutions to our clients
3D Graphics
Do I need 3D graphics ? • Of course YES !! • why ? – GPU is very efficient in using power -> MORE BATTERY LIFE BATTERY LIFE – using the native 3D layer makes your app be extremely responsive – Competitive edge for your app !
GPU Information • Mobiles use GPU’s which are usually tile based deferred rendering – screen is split into tiles – Each tile processed on a GPU core – Each tile processed on a GPU core
Graphics Tips : Culling
Level of Detail
Batch Your Rendering • draw opaque objects first and then transparent objects afterwards – DO NOT MIX THEM for a tile based GPU • draw objects of the same shader material • draw objects of the same shader material together – otherwise too many context switch occurs – these take a lot of processing time – Difficult to detect unless capture/analysis tools are used
Use hardware depth culling • Enable depth culling to avoid rendering of obstructed objects – glEnable (GL_DEPTH_TEST) • This culling takes place at pixel level after • This culling takes place at pixel level after raster stage and is automatically taken care by hardware
Finally.. • Optimize your shader code – Check cycle count • Check for glError after every context call • Try avoiding memory management • Try avoiding memory management – Allocate once and reuse • Submit render calls from a single thread
Thank YOU !! • References – Check PowerVR SDK and samples • PowerVR Series 5.SGX Architecture Guide for Developers.1.0.13.External • http://www.imgtec.com/downloads.asp – Android NDK • http://developer.android.com/tools/sdk/ndk/index.html
Recommend
More recommend