Blendtable (DEF): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
'''raw''' { [...] } | '''raw''' { [...] } | ||
DESCRIPTION | |||
:: '''file''' <filename> | :: '''file''' <filename> | ||
:: | :: DESCRIPTION | ||
:: '''offset''' <value> | :: '''offset''' <value> | ||
:: | :: DESCRIPTION | ||
'''glblend''' { [...] } | '''glblend''' { [...] } | ||
DESCRIPTION | |||
:: '''forward''' { [...] }<br />'''reverse''' { [...] }<br />'''both''' { [...] } | :: '''forward''' { [...] }<br />'''reverse''' { [...] }<br />'''both''' { [...] } | ||
:: | :: DESCRIPTION | ||
:::: {| cellpadding="0" cellspacing="0" border="0" | :::: {| cellpadding="0" cellspacing="0" border="0" | ||
Line 42: | Line 42: | ||
|} | |} | ||
:::: | :::: DESCRIPTION | ||
:::: See [[#Factors|below]]. | :::: See [[#Factors|below]]. | ||
Line 48: | Line 48: | ||
:::: '''alpha''' <value> | :::: '''alpha''' <value> | ||
:::: | :::: DESCRIPTION | ||
'''copy''' <> | '''copy''' <> | ||
DESCRIPTION | |||
'''undef''' <> | '''undef''' <> | ||
DESCRIPTION | |||
== Factors == | == Factors == |
Revision as of 09:08, 22 February 2020
This page is under construction. Please help review and edit this page. |
blendtable <blendtable> { [...] }
Loads a blend table from a raw image file.
The image file MUST contain a 256 color table of its own. Each pixel will have their matching color in the table converted in the blend table.
A single image file may contain multiple base palettes, and offset can used to locate it.
The first ID is reserved to the 33% transparency.
See also numalphatables.
Tokens
raw { [...] }
DESCRIPTION
- file <filename>
- DESCRIPTION
- offset <value>
- DESCRIPTION
glblend { [...] }
DESCRIPTION
- forward { [...] }
reverse { [...] }
both { [...] }
- forward { [...] }
- DESCRIPTION
src <factor>
dst <factor>(or sfactor / top)
(or dfactor / bottom)
- DESCRIPTION
- See below.
- alpha <value>
- DESCRIPTION
copy <>
DESCRIPTION
undef <>
DESCRIPTION
Factors
- ZERO
- ONE
- SRC_COLOR
- ONE_MINUS_SRC_COLOR
- SRC_ALPHA
- ONE_MINUS_SRC_ALPHA
- DST_ALPHA
- ONE_MINUS_DST_ALPHA
- DST_COLOR
- ONE_MINUS_DST_COLOR
Examples
The following PNG image contains the blend table in Duke Nukem 3D v1.5:
This example will load 3 blend tables in the same file:
blendtable 0 { raw { file "blend.raw" } } blendtable 1 { raw { file "blend.raw" offset 65536 } } blendtable 2 { raw { file "blend.raw" offset 131072 } }