Version: 2023.2
言語: 日本語

TextureFormat

enumeration

マニュアルに切り替える

説明

テクスチャの形式を設定します。テクスチャをスクリプト側で作成する際に使用します。

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Create a new alpha-only texture and assign it // to the renderer's material Texture2D texture = new Texture2D(128, 128, TextureFormat.Alpha8, false); GetComponent<Renderer>().material.mainTexture = texture; } }

Note that not all graphics cards support all texture formats, use SystemInfo.SupportsTextureFormat to check. Also, only the Texture2D class supports texture creation from script with Crunch compression texture formats.

関連項目: Texture2D, texture assets.

変数

Alpha8Alpha-only texture format, 8 bit integer.
ARGB44441 ピクセル 16 ビットのテクスチャ形式 アルファチャンネルが適用されています
RGB24Three channel (RGB) texture format, 8-bits unsigned integer per channel.
RGBA32Four channel (RGBA) texture format, 8-bits unsigned integer per channel.
ARGB321 チャンネルあたり 8 ビットで構成されたアルファチャンネルを持つカラーのテクスチャ形式
RGB56516 ビットカラーのテクスチャ形式
R16Single channel (R) texture format, 16-bits unsigned integer.
DXT1圧縮されたテクスチャ形式
DXT5圧縮されたアルファが適用されているテクスチャ形式
RGBA44441 チャンネルあたり 4 ビットで構成されたアルファチャンネルを持つ色のテクスチャ形式
BGRA321 チャンネルあたり 8 ビットで構成されたアルファチャンネルを持つカラーのテクスチャ形式
RHalfスカラー値 (R) のテクスチャ形式 16 ビットの浮動小数点
RGHalf2 色 (RG) のテクスチャ形式 各チャンネル 16 ビットの浮動小数点
RGBAHalfRGB カラーとアルファチャンネルのテクスチャ形式 各チャンネルは 16 ビットの浮動小数点
RFloatスカラー値 (R) のテクスチャ形式 32 ビットの浮動小数点
RGFloat2 色 (RG) のテクスチャ形式 各チャンネル 32 ビットの浮動小数点
RGBAFloatRGB color and alpha texture format, 32-bit floats per channel.
YUY2A format that uses the YUV color space and is often used for video encoding or playback.
RGB9e5FloatRGB HDR format, with 9 bit mantissa per channel and a 5 bit shared exponent.
BC4Compressed one channel (R) texture format.
BC5Compressed two-channel (RG) texture format.
BC6HHDR compressed color texture format.
BC7High quality compressed color texture format.
DXT1CrunchedCompressed color texture format with Crunch compression for smaller storage sizes.
DXT5CrunchedCompressed color with alpha channel texture format with Crunch compression for smaller storage sizes.
PVRTC_RGB21ピクセル2ビットの圧縮されたテクスチャ形式( iOS 専用)
PVRTC_RGBA21ピクセル2ビットのアルファが適用されている、圧縮されたテクスチャ形式
PVRTC_RGB41ピクセル4ビットの圧縮されたテクスチャ形式( iOS 専用)
PVRTC_RGBA41ピクセル4ビットのアルファが適用されている、圧縮されたテクスチャ形式
ETC_RGB41ピクセル4ビットの圧縮されたテクスチャ形式( OpenGL ES 2.0 専用)
EAC_R1ピクセルにつき4ビットで圧縮された符号なしシングルチャンネルテクスチャ形式の ETC2 / EAC (GL ES 3.0 専用)
EAC_R_SIGNED1ピクセルにつき4ビットで圧縮された符号ありシングルチャンネルテクスチャ形式の ETC2 / EAC (GL ES 3.0 専用)
EAC_RG1ピクセルにつき8ビットで圧縮された符号なしデュアルチャンネル (RB) テクスチャ形式の ETC2 / EAC (GL ES 3.0 専用)
EAC_RG_SIGNED1ピクセルにつき8ビットで圧縮された符号ありデュアルチャンネル (RB) テクスチャ形式の ETC2 / EAC (GL ES 3.0 専用)
ETC2_RGBETC2 (GL ES 3.0 用) による各ピクセル4ビットの圧縮 RGB テクスチャ形式。
ETC2_RGBA1ETC2 (GL ES 3.0 用) による各ピクセル4ビットの RGB チャンネル と、1ビットのアルファチャンネルを持つテクスチャ形式
ETC2_RGBA8ETC2 (GL ES 3.0 用) による各ピクセル8ビットの圧縮 RGBA テクスチャ形式
ASTC_4x4ASTC (4x4 pixel block in 128 bits) compressed RGB(A) texture format.
ASTC_5x5ASTC (5x5 pixel block in 128 bits) compressed RGB(A) texture format.
ASTC_6x6ASTC (6x6 pixel block in 128 bits) compressed RGB(A) texture format.
ASTC_8x8ASTC (8x8 pixel block in 128 bits) compressed RGB(A) texture format.
ASTC_10x10ASTC (10x10 pixel block in 128 bits) compressed RGB(A) texture format.
ASTC_12x12ASTC (12x12 pixel block in 128 bits) compressed RGB(A) texture format.
RG16Two channel (RG) texture format, 8-bits unsigned integer per channel.
R8Single channel (R) texture format, 8-bits unsigned integer.
ETC_RGB4CrunchedCompressed color texture format with Crunch compression for smaller storage sizes.
ETC2_RGBA8CrunchedCompressed color with alpha channel texture format using Crunch compression for smaller storage sizes.
ASTC_HDR_4x4ASTC (4x4 pixel block in 128 bits) compressed RGB(A) HDR texture format.
ASTC_HDR_5x5ASTC (5x5 pixel block in 128 bits) compressed RGB(A) HDR texture format.
ASTC_HDR_6x6ASTC (6x6 pixel block in 128 bits) compressed RGB(A) HDR texture format.
ASTC_HDR_8x8ASTC (8x8 pixel block in 128 bits) compressed RGB(A) texture format.
ASTC_HDR_10x10ASTC (10x10 pixel block in 128 bits) compressed RGB(A) HDR texture format.
ASTC_HDR_12x12ASTC (12x12 pixel block in 128 bits) compressed RGB(A) HDR texture format.
RG32Two channel (RG) texture format, 16-bits unsigned integer per channel.
RGB48Three channel (RGB) texture format, 16-bits unsigned integer per channel.
RGBA64Four channel (RGBA) texture format, 16-bits unsigned integer per channel.
R8_SIGNEDSingle channel (R) texture format, 8-bits signed integer.
RG16_SIGNEDTwo channel (RG) texture format, 8-bits signed integer per channel.
RGB24_SIGNEDThree channel (RGB) texture format, 8-bits signed integer per channel.
RGBA32_SIGNEDFour channel (RGBA) texture format, 8-bits signed integer per channel.
R16_SIGNEDSingle channel (R) texture format, 16-bits signed integer.
RG32_SIGNEDTwo channel (RG) texture format, 16-bits signed integer per channel.
RGB48_SIGNEDThree color (RGB) texture format, 16-bits signed integer per channel.
RGBA64_SIGNEDFour channel (RGBA) texture format, 16-bits signed integer per channel.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961