Jump to content

OBD talk:TXMP: Difference between revisions

Line 202: Line 202:
:Q: Ever used? Effect? ^^ [[User:Geyser|geyser]]
:Q: Ever used? Effect? ^^ [[User:Geyser|geyser]]
:A: There is no texture in any level that uses it. If it is of any use that's only at runtime. [[User:Neo|Neo]]
:A: There is no texture in any level that uses it. If it is of any use that's only at runtime. [[User:Neo|Neo]]
:More exactly this changes the alpha blending mode for the texture that uses it. Normally transparency is calculates using the formula
::TextureColor * TextureAlpha + ExistingScreenColor * (1 - TextureAlpha)
:but when this bit is set blending is done using another formula
::TexureColor * TextureAlpha + ExistingScreenColor
:The obvious effect of this is that black becomes transparent because adding 0 results in the same color (but note that black is not a special "transparency" color). Most of the textures where this is used don't even have an alpha channel and TextureAlpha is considered to be 1 in those cases so it just adds the TextureColor to the ExistingScreenColor. If you don't realised it already, this is used to make "light sources" like explosions and glares.
====0x 00 10 00 00====
====0x 00 10 00 00====
:On if there are 16 bits per uncompressed pixel (color depth etc may vary) ==> no changes ==> Oni reads it directly from the raw file [[User:Ssg|Ssg]] 11:06, 13 February 2007 (CET)
:On if there are 16 bits per uncompressed pixel (color depth etc may vary) ==> no changes ==> Oni reads it directly from the raw file [[User:Ssg|Ssg]] 11:06, 13 February 2007 (CET)
Anonymous user