Properties{}ブロックの中に記述するPropertyは次の種類がある。
- Float Range (Range):スライダで範囲指定
- Color(Color):RGBAの4次元配列。各値は0~1
- Texuture2D(2D):テクスチャ
- Rectangle(Rect):
- Cubemap(Cube):Cubemap
- Float(Float):不動小数点数
- Vector(Vector):ベクトル配列
サンプル
Properties { // properties for water shader _WaveScale ("Wave scale", Range (0.02,0.15)) = 0.07 // sliders _ReflDistort ("Reflection distort", Range (0,1.5)) = 0.5 _RefrDistort ("Refraction distort", Range (0,1.5)) = 0.4 _RefrColor ("Refraction color", Color) = (.34, .85, .92, 1) // color _ReflectionTex ("Environment Reflection", 2D) = "" {} // textures _RefractionTex ("Environment Refraction", 2D) = "" {} _Fresnel ("Fresnel (A) ", 2D) = "" {} _BumpMap ("Bumpmap (RGB) ", 2D) = "" {} }
プロパティ名("表示名",種類) = デフォルト値
という構造はすべて同じ。
デフォルト値の指定方法はPropertyの種類によって異なる。 - Range/Float 数値 - Color/Vector 4次元配列 - 2D/Rect/Cube 空文字""、または、ビルトイン・テクスチャ名(“white”, “black”, “gray” or “bump")
テクスチャ系(2D/Rect/Cube)の {}内にはオプションを指定できる。
TexGen: texgenmode=テクスチャ座標を自動生成モード。ObjectLinear, EyeLinear, SphereMap, CubeReflect, CubeNormalのいずれかを指定。
LightmapMode:指定した場合はlightmapパラメータの影響を受ける。Renderer.lightmapIndex