2011年12月28日 星期三

LLVM introduction

LLVM introduction
View more presentations from Jim Huang

Getting Started with the LLVM System

http://llvm.org/docs/GettingStarted.html  

Getting Started: Building and Running Clang

http://clang.llvm.org/get_started.html

2011年12月21日 星期三

Google: Native Client Getting Started

Getting Started: https://developers.google.com/native-client/devguide/tutorial

OpenGL tutorial
http://www.gamedevblog.com/2011/07/native-client-opengl-tutorial.html

2011年12月11日 星期日

Google: Native Client

Support the x86-32, x86-64 and ARM instruction sets.

NaCl started as a downloadable NPAPI plugin for multiple browsers, including Firefox, Safari, Opera and Chrome and was designed to transparently load and run other NPAPI plugins compiled as nexes.

http://www.chromium.org/nativeclient/getting-started/getting-started-background-and-basics

Download sdk: https://developers.google.com/native-client/sdk/download

Native Client: A Sandbox for Portable, Untrusted x86 Native Code:
http://static.googleusercontent.com/external_content/untrusted_dlcp/research.google.com/zh-TW//pubs/archive/34913.pdf

2011年12月6日 星期二

Problem of Titanium sdk install Android SDK

Install Android SDK to Titanium in windows you may occur some problem:
  1. Could not loacate the android sdk titantium
    Add empty folder "android-7" into "$ANDROID_SDK/platforms/", copy your android sdk folder's content into "android-7". ( for ex: "android-13" to "android-7" )
  2. [ERROR] Required jarsigner not found
    [ERROR] Required javac not found
    [ERROR] Required java not found
    [ERROR] One or more required files not found - please check your 
    JAVA_HOME environment variable JAVA_HOME = C:\Program Files\Java\jdk1.7.0_01
    But JDK is needed 1.6, reinstall JDK 1.6 and set   
    JAVA_HOME = C:\Program Files\Java\jdk1.6.0_29
    
    

2011年12月4日 星期日

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

    2011年12月1日 星期四

    Adobe AIR on mobile platform

    Today I port my Flash Player version 3D engine to Adobe AIR, in order to support Android/iOS platform. Because my engine has been done on the PC/Web, so we can't aware performance penalty easily, now I forward to mobile platform, they have limit resource. We need to more optimize our engine. Because iOS version has been convert AS3 to native code, so I believe and found game loop and render loop are not the critical part. The GPU processing part is the issue.

    We have done several things, I list them on the bottom: ( improving the fps from 4 to 26 )
    1. Resize our texture size, smaller is better.
    2. Reduce redundant shader instruction, especially pixel part. We remove the fog and alpha-test part ( for supporting alpha-test, we use 'kil' - it's very evil )
    3. Disable lighting and shadow map.
    4. Currently, event-listener is not the issue.
    5. Continuing we want to try disable mipmap, it may help us improve current performance.

      OpenGL ES Programming Guide for iOS: http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Introduction/Introduction.html