2011年3月26日 星期六

Pixel Bender 核心規格 - Kernel metadata

Kernel的後設標籤(Kernel metadata)
原文:
The first portion of the kernel definition is the kernel metadata, a series of name-value pairs enclosed in angle brackets:
  • 第一部分定義的是kernel的metadata部分,由一系列的name:value構成。
<
 name1 : value1;
 name2 : value2;
 ...
>;

後設標籤的參數(These metadata values are predefined):
namespace(名稱空間):
  • Required. A string, the namespace within which this kernel is defined. The namespace value is used in combination with the other filter identifiers to determine the actual namespace, so it need not be globally unique. You can use it, for example, to distinguish categories of kernels.(namespace一定要宣告,是一個字串)。
vendor(供應者):
  • Required. A string, the vendor supplying this kernel. (供應者一定要宣告,一個字串)。
version(版本):
  •  Required. An integer value, the version number of this implementation of this kernel. This is distinct from the kernel language version specified in the languageVersion element.(版本,一定要宣告,是一個整數數值)。
description(描述):
  • Optional. A string describing the purpose of this kernel. Applications that integrate with Pixel Bender have access to this value, and can use it to create menu items, tooltips, or other UI elements. (描述,是可選擇要不要的,一個字串)。
example:
<
 namespace : "jt.com.tw";
 vendor : "J";
 version : 1;
 description: "Grayscale filter"; 
>


AFTER EFFECTS NOTE: 
After Effects defines two additional kernel metadata properties, both of which are optional:

  • After Effects上有兩個meatdata後設標籤可以使用,這兩個標籤是可選擇要不要的。
displayname(顯示名稱):
  • An effect name to show in the Effects and Presets panel. If not specified, the kernel name is used. 
一個效果的名稱,顯示在效果和預設面板上。如果沒有指定,將會使用kernel的名字。

category(種類):
  • The category of the effect. Default is the 'Pixel Bender' category. 
效果的種類,預設是'Pixel Bender'。

Kernel後設標籤的數值必須是以下這些資料格式:
Kernel metadata values must be one of these data types:

int, int2, int3, int4
float, float2, float3, float4
float2x2, float3x3, float4x4
bool, bool2, bool3, bool4
string

沒有留言:

張貼留言