News: 11 March 2016 - Forum Rules

Author Topic: PSX CLUT (Color Lookup Table)  (Read 2294 times)


  • Full Member
  • ***
  • Posts: 224
    • View Profile
    • Livejournal
PSX CLUT (Color Lookup Table)
« on: December 30, 2013, 07:25:21 am »
Can someone show me what this would look like:

The CLUT starts with a simple 32-bit word telling the length, in bytes, of the entire CLUT block (including the header). Following that is a set of four 16-bit values telling how the CLUT data should be loaded into the frame buffer. These measurements are in frame buffer pixels, which are 16-bit. Each CLUT is stored in a rectangular portion of the frame buffer, which is typically 16 or 256 pixels wide (corresponding to 4-bit or 8-bit color indices). The rows define one or more 'palettes' which can be selected at runtime to use when drawing a color-indexed image.

Error creating thumbnail: Unable to save thumbnail to destination

The length of the CLUT data is always width × height × 2 bytes, precisely the amount of data needed to fill a rectangular area of width × height pixels in the frame buffer. Also, the x coordinate of the CLUT needs to be an even multiple of 16, but the y coordinate can be any value between 0-511. Typically they are stored directly under the front/back buffers. Each 16-bit value is interpreted as real color frame buffer pixels, which have the following format:

Error creating thumbnail: Unable to save thumbnail to destination

The red, green and blue samples behave like any RGB-defined color, but the STP (special transparency processing) bit has varying special meanings. Depending on the current transparency processing mode, it denotes if pixels of this color should be treated as transparent or not. If transparency processing is enabled, pixels of this color will be rendered transparent if the STP bit is set. A special case is black pixels (RGB 0,0,0), which by default are treated as transparent by the PlayStation unless the STP bit is set.