Version: 5.5

RenderTexture

class in UnityEngine

/

継承:Texture

マニュアルに切り替える

説明

レンダーテクスチャはレンダリングを行なうことができるテクスチャです。

They can be used to implement image based rendering effects, dynamic shadows, projectors, reflections or surveillance cameras.

One typical usage of render textures is setting them as the "target texture" property of a Camera (Camera.targetTexture), this will make a camera render into a texture instead of rendering to the screen.

別の使用例はさまざまなレンダリングエフェクトを手動で実装します。例 Image Effects 。一時的な短命のレンダーテクスチャを頻繁に取得し (参照 GetTemporaryReleaseTemporary 関数)、それらに手動でオブジェクトをレンダリングします (参照 Graphics.DrawMeshNowGraphics.Blit) 。

Keep in mind that render texture contents can become "lost" on certain events, like loading a new level, system going to a screensaver mode, in and out of fullscreen and so on. When that happens, your existing render textures will become "not yet created" again, you can check for that with IsCreated function.

As with other "native engine object" types, it is important to pay attention to the lifetime of any render textures and release them when you are finished using them with the Release function, as they will not be garbage collected like normal managed types.

See Also: Camera.targetTexture.

Static 変数

active現在アクティブなレンダーテクスチャ

変数

antiAliasingレンダーテクスチャのアンチエイリアスレベル
autoGenerateMipsMipmap levels are generated automatically when this flag is set.
colorBufferRenderTexture のカラーバッファ(読み取り専用)
depthThe precision of the render texture's depth buffer in bits (0, 16, 24/32 are supported).
depthBufferRenderTexture の深度/ステンシルバッファ(読み取り専用)
dimensionレンダーテクスチャの次元 (形式)
enableRandomWriteShader Model 5.0 レベルのシェーダーでこのレンダーテクスチャにランダムアクセス書き込みを有効にします。
formatレンダーテクスチャのカラー形式
heightピクセル単位のテクスチャの高さ
sRGBsRGB の読み込み/書き込み 変換が可能かどうか(読み取り専用)
useMipMapRender texture has mipmaps when this flag is set.
volumeDepth3D Render Texture のボリュームの最大値
widthピクセル単位のテクスチャの幅

コンストラクタ

RenderTexture新規の RenderTexture オブジェクトを作成します

Public 関数

Create実際に RenderTexture オブジェクトを作成します
DiscardContentsRenderTexture オブジェクトの内容を破棄します
GenerateMipsGenerate mipmap levels of a render texture.
GetNativeDepthBufferPtr深度バッファリソースを指すネイティブ (グラフィックス API に内在する) のポインターを取得します。
IsCreated実際に RenderTexture オブジェクトを生成しているか確認します
MarkRestoreExpectedRenderTexture のリストア処理が期待されることを示します
ReleaseRenderTexture オブジェクトを解放します
SetGlobalShaderPropertyプロパティーネームで RenderTexture オブジェクトにシェーダーを割りあてます

Static 関数

GetTemporary一時的なレンダリングテクスチャを割り当てます
ReleaseTemporary GetTemporary 関数で割り当てられた一時的なテクスチャを解放します
SupportsStencilRenderTexture にステンシルバッファがあるかどうか

継承メンバー

変数

hideFlagsオブジェクトは非表示、シーンに保存、ユーザーが編集可能、などを設定する。
nameオブジェクト名
anisoLevelテクスチャの異方性フィルタリングのレベル
dimensionテクスチャの次元 (タイプ)。読み取り専用。
filterModeテクスチャのフィルタリングモード
heightピクセル単位でのテクスチャの高さ(読み取り専用)
mipMapBiasミップマップのバイアス
widthピクセル単位でのテクスチャの幅(読み取り専用)
wrapModeテクスチャのラップモード (リピートやクランプ)

Public 関数

GetInstanceIDオブジェクトのインスタンス ID を返します
ToStringゲームオブジェクトの名前を返します
GetNativeTexturePtrテクスチャリソースへのネイティブ (グラフィックス API に内在する) ポインターを取得します。

Static 関数

Destroyゲームオブジェクトやコンポーネント、アセットを削除します
DestroyImmediateオブジェクト obj を破棄します。
DontDestroyOnLoad新しいシーンを読み込んでもオブジェクトが自動で破壊されないように設定します
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeタイプから見つけたすべてのアクティブのオブジェクト配列を返します
Instantiateoriginal のオブジェクトをクローンします
SetGlobalAnisotropicFilteringLimits異方性のリミットを設定します

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。