Optimizing Graphics Performance on iOS/Android

iOS:

  • 遵守可視的vertex數目限制:
    • 40K - iPhone 3GS以後的新裝置(with SGX GPU)
    • 10K - 較舊款的裝置(with MBX GPU)
  • 如果可能要採用lighing shader,vertex lit會是比較好的選擇
  • 盡可能share material,減少不同material的數目
  • 非會移動的物件,指定為靜態物件會帶來最佳化
  • 使用PVRTC格式或是16bit textures
  • 盡量使用single pass pass的效果
  • 盡可能降低shader floating point的精確度
  • 減少使用複雜的shader指令在pixel shader-pow, sin, cos 
  • 盡量避免使用pixel lighting,頂多一盞(推薦方向光為主)
  • 不要使用動態光源當非必要時 -- 使用lightmap會比較好
  • 在pixel shader貼圖使用越少越好
  • 避免用alpha-testing,用alpha-blending取代
  • 非必要時不要使用fog
  • 盡可能使用Occlusion culling以達到節省draw call次數。 
  • 使用skyboxes來模擬遠方景物。
Android:
  • 如果可能要採用lighing shader,vertex lit會是比較好的選擇
  • 盡可能share material,減少不同material的數目
  • 非會移動的物件,指定為靜態物件會帶來最佳化
  • 使用ETC1 格式或是16bit textures
  • 使用mipmaps
  • 盡量使用single pass pass的效果
  • 盡可能降低shader floating point的精確度
  • 減少使用複雜的shader指令在pixel shader-pow, sin, cos 
  • 盡量避免使用pixel lighting,頂多一盞(推薦方向光為主)
  • 不要使用動態光源當非必要時 -- 使用lightmap會比較好
  • 在pixel shader貼圖使用越少越好
  • 避免用alpha-testing,用alpha-blending取代
  • 非必要時不要使用fog
  • 盡可能使用Occlusion culling以達到節省draw call次數。 
  • 使用skyboxes來模擬遠方景物。
Reference: http://unity3d.com/support/documentation/Manual/Optimizing%20Graphics%20Performance.html

    Comments

    Popular posts from this blog

    董事長您好

    After reading Steve Jobs Autobiography

    Drawing textured cube with Vulkan on Android