-
Notifications
You must be signed in to change notification settings - Fork 5
/
TEXB_stream_format.txt
67 lines (57 loc) · 2.01 KB
/
TEXB_stream_format.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--------------------------------------------------------------------------
TEXB File format
TEXB file format describe a texture.
Texture can embbed multiple "images" which are not only rectangular but
is defined as a triangle soup.
2011/12/06 V0.1 : First Draft
2011/12/09 V0.15: Added information about "Type" field, compressed texture is not complete still.
2012/01/12 V0.2 : Updated information about C String format for ressource name
2012/01/26 V0.3 : Added member width, height into image asset
--------------------------------------------------------------------------
[TEXB](u32)
Size (u32)
String Length (u16)
Length include 0 and padding alignment
C String (0 included, + padding align 2)
T + full resource path name
example : Tpackage.package2.filename.texb
Width (u16)
Height (u16)
Type (u16)
Bit 0..2 : [0] ALPHA | [1] LUMA | [2] LUMALPHA | [3] RGB | [4] RGBA
Bit 3 : [0] False, [1] True --> Compressed
Bit 4 : [0] False, [1] True --> Mipmap
Bit 5 : [0] False, [1] True --> Double Buffered
Bit 6..7 : Pixel Format
0 : 565 RGB
1 : 5551 RGBA
2 : 4444 RGBA
3 : Byte
TODO RP : Add Bit definition for compressed texture format type (ETC1 variation, etc...)
Can reuse pixel format bits if necessary
TotalVertexCount (u16)
TotalIndexCount (u16)
ImageCount (u16)
(multiply by Image Count)
[TIMG] (u32)
Size (u16)
String Length (u16)
Length include 0 and padding alignment
C String (0 included, + padding align 2)
I + full resource path name
Ipackage.package2.filenameB.imag
VertexCount (u8)
IndexCount (u8)
Width (u16)
Height (u16)
CenterX (u16)
CenterY (u16)
(multiply by VertexCount)
X (u32 fixed 16.16)
Y (u32 fixed 16.16)
U (u32 fixed 16.16)
V (u32 fixed 16.16)
(multiply by IndexCount)
Index (u8)
[... Texture Bitmap Data...]
------------------------------------------------------------------------