2011年3月26日 星期六

使用Piex Bender 運行在Flash Player上注意事項

Using Pixel Bender with Flash Player
將Piex Bender使用在Flash Player上需注意:

原文:
  1. The preprocessor symbol AIF_FLASH_TARGET is defined to be 1.
  2. Flash Player always uses 1x1 square pixels. The function pixelSize() always returns (1.0, 1.0), and pixelAspectRatio() always returns 1.0.
  3. The selection operator (?:) can be used only to select between two constants or variables.
  4. Pixel Bender images have 32 bits per channel, but graphics in Flash Player 10 have only 8 bits per channel. When a kernel is run in Flash Player, the input image data is converted to 32 bits per channel and then converted back to 8 bits per channel when kernel execution is complete.
  5.  The only available flow-control statements are if and else.
  6. The following are not supported:
   Region functions .
   Custom support functions and libraries.
   Dependent values.
   Arrays.
   The Pixel Bender graph language.
  1. 預先處理符號 AIF_FLASH_TARGET 需被定義為1。
  2. Flash Player只會使用 1x1方形像素。pixelSize()總是回傳(1.0,1.0)而 pixelAspectRatio() 總是回傳1.0。
  3. 運算子 ?:只能用於選擇常數或是變數。
  4. Pixel Bender圖像每一通道有32bit,但圖形在Flash Player 10每通道只有8bit。當Kernel運行在Flash Player時,輸入圖像的資料將轉換成每通道32bit,當kernel執行完成將會轉回成每通道8bit。
  5. 用於Flash Player上時,流程控制只能使用if 與 else
  6. 下列是不支持的
  Region函式。
  客制化函式與類別庫。
  Dependent values。
  陣列。
  Pixel Bender的圖形語言。


沒有留言:

張貼留言