言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

Shader.SetGlobalTexture

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static function SetGlobalTexture(nameID: int, tex: Texture): void;
public static void SetGlobalTexture(int nameID, Texture tex);
public static def SetGlobalTexture(nameID as int, tex as Texture) as void

Description

全てのシェーダーに適用されるグローバルなTextureプロパティを設定します

シェーダーが明確なマテリアルを持たない( Properties ブロックが定義されていない)場合、 グローバルなプロパティ が使用されます。 カスタムシェーダーを持つ場合に、 全て同じ "グローバル" なテクスチャ(例えばカスタマイズしたDiffuse-LightingのCubemap) を使用します。 グローバルなプロパティをスクリプトから設定することが出来ますし、全てのマテリアルに同じプロパティを設定する 必要はありません。 See Also: SetGlobalColor, SetGlobalFloat; Material クラス, ShaderLab ドキュメント.