Tilefromtexture (DEF): Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
 
Fox (talk | contribs)
No edit summary
Line 1: Line 1:
[[Category:WIP pages]]
'''tilefromtexture''' <tilenum> { [...] }
 
Used to generate an 8-bit tile from an image file.  Use the alpha channel for transparency instead of the pink color.
 
== Tokens ==
 
{| cellpadding="0" cellspacing="0" border="0"
| valign="top" | '''file''' <filename>
| width="20px" |
| valign="top" | (or '''name''')
|-
|}
 
Defines which texture file to use. File may be any PNG, JPG, DDS, TGA, BMP, GIF or PCX file. This instruction must be supplied.
 
'''alphacut''' <value>
 
Sets the level of transparency at which a pixel in the texture is considered opaque. Pixels with more transparency than the cut-off are not drawn to the screen when rendered. The default setting is 0.32, which is just below the 33% transparency level of Build. If your texture has areas that are more transparent than the default, you can lower the cut-off level to preserve that detail.
 
{| cellpadding="0" cellspacing="0" border="0"
| valign="top" | '''xoffset''' <value>
| width="20px" |
| valign="top" | (or '''xoff''')
|-
|}
 
Set the x-offset of the tile.
 
{| cellpadding="0" cellspacing="0" border="0"
| valign="top" | '''yoffset''' <value>
| width="20px" |
| valign="top" | (or '''yoff''')
|-
|}
 
Set the y-offset of the tile.
 
'''texhitscan'''
 
Set [[texture hitscan]] for the tile.
 
'''nofullbright'''
 
The texture will be converted to the game palette without fullbright colors.


[[Category:DEF commands]]
[[Category:DEF commands]]

Revision as of 13:20, 21 February 2020

tilefromtexture <tilenum> { [...] }

Used to generate an 8-bit tile from an image file. Use the alpha channel for transparency instead of the pink color.

Tokens

file <filename> (or name)

Defines which texture file to use. File may be any PNG, JPG, DDS, TGA, BMP, GIF or PCX file. This instruction must be supplied.

alphacut <value>

Sets the level of transparency at which a pixel in the texture is considered opaque. Pixels with more transparency than the cut-off are not drawn to the screen when rendered. The default setting is 0.32, which is just below the 33% transparency level of Build. If your texture has areas that are more transparent than the default, you can lower the cut-off level to preserve that detail.

xoffset <value> (or xoff)

Set the x-offset of the tile.

yoffset <value> (or yoff)

Set the y-offset of the tile.

texhitscan

Set texture hitscan for the tile.

nofullbright

The texture will be converted to the game palette without fullbright colors.