opengl:texturefileformat
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン最新のリビジョン両方とも次のリビジョン | ||
opengl:texturefileformat [2015/07/04 02:59] – [PVR format version 2] oga | opengl:texturefileformat [2015/07/04 03:06] – [Texture File Format] oga | ||
---|---|---|---|
行 2: | 行 2: | ||
- | ^ file format | + | ^ file format |
- | ^ ::: ^ ::: ^ ::: ^ ::: ^ ::: ^ ::: ^ ::: ^ ::: ^ 3D ^ ::: | + | ^ ::: ^ ::: ^ ::: ^ ::: ^ ::: ^ ::: ^ ::: |
- | | DDS (.dds) | + | | DDS (.dds) |
- | | KTX (.ktx) | + | | KTX (.ktx) |
- | | PVR (.pvr) | + | | PVR (.pvr) |
- | | PKM (.pkm) | + | | PKM (.pkm) |
- | | ASTC (.astc) | | + | | ASTC (.astc) | |
* (a) = Qualcomm(ATI) のコンバータが FourCC を使って格納。おそらく独自仕様。元は Direct3DM 向け。Array 不可 | * (a) = Qualcomm(ATI) のコンバータが FourCC を使って格納。おそらく独自仕様。元は Direct3DM 向け。Array 不可 | ||
* (b) = PVRTC 独自仕様。FourCC で格納。Array 不可 | * (b) = PVRTC 独自仕様。FourCC で格納。Array 不可 | ||
- | * (d) = ASTC の 3D BLOCK 圧縮のみ格納可能。 | + | * (d) = DXGI_FORMAT 表現可能なフォーマットのみ Array を格納可能。DX10 拡張ヘッダ必須。 |
- | * (e) = DXGI_FORMAT 表現可能なフォーマットのみ Array を格納可能。D3D10 拡張ヘッダ必須。 | + | * (e) = ETC1 のみ格納可能。 |
+ | * (f) = ASTC の 3D BLOCK 圧縮のみ格納可能。 | ||
行 123: | 行 125: | ||
<code cpp> | <code cpp> | ||
+ | enum { | ||
+ | KTX_HEADER_MAGIC0 | ||
+ | KTX_HEADER_MAGIC1 | ||
+ | KTX_HEADER_MAGIC2 | ||
+ | KTX_HEADER_ENDIAN | ||
+ | }; | ||
+ | |||
struct T_KTXHEADER { // 64byte | struct T_KTXHEADER { // 64byte | ||
UI32 Identifier[3]; | UI32 Identifier[3]; | ||
行 166: | 行 175: | ||
* PVRTC-2 対応 | * PVRTC-2 対応 | ||
* データ並びが KTX 順 | * データ並びが KTX 順 | ||
+ | |||
+ | <code cpp> | ||
+ | struct T_PVR3HEADER { // 13x4 = 52 | ||
+ | unsigned int Version; | ||
+ | unsigned int Flags; | ||
+ | unsigned int PixelFormat[2]; | ||
+ | unsigned int ColorSpace; | ||
+ | unsigned int ChannelType; | ||
+ | unsigned int Height; | ||
+ | unsigned int Width; | ||
+ | unsigned int Depth; | ||
+ | unsigned int Surfaces; | ||
+ | unsigned int Faces; | ||
+ | unsigned int MipMapCount; | ||
+ | unsigned int MetaDataSize; | ||
+ | }; | ||
+ | </ | ||
< | < | ||
行 177: | 行 203: | ||
* PVRTC-2 非対応 | * PVRTC-2 非対応 | ||
* データ並びが DDS 順 | * データ並びが DDS 順 | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | ( ( ( width * height ) * mip ) * [cube_face or volume_depth] ) | ||
+ | </ | ||
+ | |||
<code cpp> | <code cpp> | ||
struct T_PVR2HEADER { | struct T_PVR2HEADER { | ||
- | unsigned int hsize; | + | unsigned int hsize; |
unsigned int height; | unsigned int height; | ||
unsigned int width; | unsigned int width; | ||
行 195: | 行 228: | ||
}; | }; | ||
</ | </ | ||
- | |||
- | |||
- | < | ||
- | ( ( ( width * height ) * mip ) * [cube_face or volume_depth] ) | ||
- | </ | ||
- | |||
- | |||
===== PKM ===== | ===== PKM ===== | ||
行 224: | 行 250: | ||
< | < | ||
- | version 1.0 | + | version 1.0 |
type: 0=ETC1-RGB, 1=ETC1-RGBA, | type: 0=ETC1-RGB, 1=ETC1-RGBA, | ||
- | version 2.0 | + | version 2.0 |
type: 0=ETC1_RGB, 1=ETC2_RGB, 2=ETC2_RGBA_OLD, | type: 0=ETC1_RGB, 1=ETC2_RGB, 2=ETC2_RGBA_OLD, | ||
</ | </ |
opengl/texturefileformat.txt · 最終更新: 2015/07/04 03:11 by oga