Render Texture (レンダーテクスチャ) は、Texture の一種であり、Unity がランタイムに作成、更新するものです。レンダーテクスチャを使用するには、Assets > Create > Render Texture に移動し、新しいレンダーテクスチャを作成し、Camera コンポーネントの Target Texture に割り当てます。その後、通常のテクスチャと同様に、Material で使用することができます。
レンダーテクスチャの Inspector は、Texture Inspector と似ています。
レンダーテクスチャの Inspector は、リアルタイムで現在のレンダーテクスチャのコンテンツを表示します。これは、レンダーテクスチャを使用するエフェクトの非常に貴重なデバッグツールと言えます。
プロパティ | 機能 | |
---|---|---|
Dimension | レンダーテクスチャの次元 (タイプ) | |
2D | レンダーテクスチャは 2 次元です。 | |
Cube | レンダーテクスチャはキューブマップです。 | |
3D | レンダーテクスチャは 3 次元です。 | |
Size | レンダーテクスチャのサイズ (ピクセル単位)。128 や 256 など、2 の累乗の値のみを入力できます。 | |
Anti-Aliasing | アンチエイリアスサンプルの数。None、2 samples、4 samples、8 samples を選択できます。None を選択した場合、Unityはアンチエイリアスを適用しません。 | |
Enable Compatible Color Format | このボックスをチェックすると、定義された Color Format がプラットフォームでサポートされていない場合に、互換性のある形式をレンダーテクスチャに適用します。 | |
Color Format | レンダーテクスチャのカラー形式 | |
Depth Buffer | 深度バッファの形式。No depth buffer、At least 16 bits depth (no stencil)、At least 24 bits depth (with stencil) のいずれかを選択できます。ステンシルバッファは汎用バッファで、スクリーンに描画されるピクセルごとに 8 ビットの符号なし整数 (0–255) を格納できます。 | |
Enable Mip Maps | このボックスをチェックすると、レンダーテクスチャが ミップマップ を生成します。 | |
Auto generate Mip Maps | Check this box to automatically fill the generated mipmaps with relevant data. If you don’t enable this, you’ll have to use the GenerateMips function to fill those mipmaps manually. Alternatively, choose which mipmap level to render into when you call the various SetRenderTarget functions. For more information about the SetRenderTarget functions, see Graphics.SetRenderTarget and Rendering.CommandBuffer.SetRenderTarget . |
|
Dynamic Scaling | このボックスをチェックすると、動的解像度スケーリング でレンダーテクスチャのサイズを変更できます。これを有効にしないと、レンダーテクスチャは動的解像度の設定にかかわらず同じサイズを維持します。 | |
Wrap Mode | テクスチャのラップ方法を制御します。 | |
Repeat | テクスチャをタイル化して、繰り返しのパターンを作成します。 | |
Clamp | テクスチャのエッジを引き延ばします。これは、画像をオブジェクトにマッピングし、テクスチャをタイル化したくない場合にラッピングのアーティファクトを防ぐのに便利です。 | |
Mirror | テクスチャをタイル化して、テクスチャをすべての整数の境界でミラーを行う繰り返しのパターンを作成します。 | |
Mirror Once | テクスチャを 1 度ミラーした後、テクスチャを固定します。 | |
Per-axis | U 軸 と V 軸 に異なるラップモードを設定できます。使用可能なオプションは、Repeat、Clamp、Mirror、Mirror Once です。例えば、リフレクションプローブに緯度経度レイアウト (円筒状) 環境マップを使用する場合は、垂直座標 (V 軸) に Clamp を設定し、水平座標 (U 軸) に Repeat を設定すると便利です。 | |
Filter Mode | テクスチャのサンプリングが近隣のピクセルを使用する方法を制御します。オプションは以下のとおりです。 | |
Point | 最も近いピクセルを使用します。テクスチャをピクセル化して表示します。 | |
Bilinear | 最も近い 4 つのテクセルの加重平均を使用します。これにより、拡大するとテクスチャがぼやけるようになります。 | |
Trilinear | Uses a weighted average of the two nearest mipmap levels, which are bilinearly filtered. This creates a soft transition between mipmap levels, at the cost of a slightly more blurry appearance. | |
Aniso Level | テクスチャの異方性フィルタリングのレベル。テクスチャを急角度で表示すると、テクスチャの品質が向上します。床、地面、道路などのテクスチャに適しています。 |
ゲーム内にライブのアリーナカメラを作成するには、以下を行います。
2019–04–11 修正されたページ
Render Texture インスペクターは Unity 2017.2 で変更
Ability to apply すべての GPU 形式をレンダーテクスチャに適用する機能は Unity 2019.1 で追加
RenderTexture
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.