Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var textureFormats = {
- i4: new TextureFormat({
- id: 0x80,
- name: "i4",
- description: "4 bit per pixel. All channels share value.",
- mask: {
- r: 0xF,
- g: 0xF,
- b: 0xF,
- a: 0xF
- }
- }),
- i8: new TextureFormat({
- id: 0x88,
- name: "i8",
- description: "8 bit per pixel. All channels share value.",
- mask: {
- r: 0xFF,
- g: 0xFF,
- b: 0xFF,
- a: 0xFF
- }
- }),
- ia4: new TextureFormat({
- id: 0x60,
- name: "ia4",
- description: "4 bit per pixel. 3 bit for greyscale channel, 1 bit for alpha channel.",
- mask: {
- r: 0xE,
- g: 0xE,
- b: 0xE,
- a: 0x1
- }
- }),
- ia8: new TextureFormat({
- id: 0x68,
- name: "ia8",
- description: "8 bit per pixel. 4 bit for greyscale channel, 4 bit for alpha channel.",
- mask: {
- r: 0xF0,
- g: 0xF0,
- b: 0xF0,
- a: 0x0F
- }
- }),
- ia16: new TextureFormat({
- id: 0x70,
- name: "ia16",
- description: "16 bit per pixel. 8 bit for greyscale channel, 8 bit for alpha channel.",
- mask: {
- r: 0xFF00,
- g: 0xFF00,
- b: 0xFF00,
- a: 0x00FF
- }
- }),
- rgb5a1: new TextureFormat({
- id: 0x10,
- name: "rgb5a1",
- description: "16 bit per pixel. 5 bit per color channel, 1 bit for alpha channel. Also known as rgba16.",
- mask: {
- r: 0xF800,
- g: 0x07C0,
- b: 0x003E,
- a: 0x0001
- }
- }),
- rgba32: new TextureFormat({
- id: 0x18,
- name: "rgba32",
- description: "32 bit per pixel. 8 bit per color channel, 8 bit for alpha channel.",
- mask: {
- r: 0xFF000000,
- g: 0x00FF0000,
- b: 0x0000FF00,
- a: 0x000000FF
- }
- }),
- ci4: new TextureFormat({
- id: 0x40,
- name: "ci4",
- description: "4 bit per pixel. Uses a rgb5a1 palette.",
- bits: 4,
- palette: true
- }),
- ci8: new TextureFormat({
- id: 0x48,
- name: "ci8",
- description: "8 bit per pixel. Uses a rgb5a1 palette.",
- bits: 8,
- palette: true
- }),
- jpeg: new TextureFormat({
- id: 0xFE,
- name: "jpeg",
- description: "Uses the JPEG File Interchange Format (JFIF) standard.",
- bits: 8
- }),
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement