10. TexNode

(1) TexNode

u32 tex_filter Sets the macro for N64 texture filtering. The following flags have been defined:

NIFF2_TEX_FILTER_POINT		0x00000000
NIFF2_TEX_FILTER_BILERP		0x00000001
NIFF2_TEX_FILTER_AVERAGE	0x00000002

Please set TEX_FILTER_BILERP as the default.
u32 use_perspective_correction Toggles texture perspective correction ON/OFF. The following flags have been defined:

NIFF2_NO_PERSPECTIVE_CORRECTION	0x00000000
NIFF2_PERSPECTIVE_CORRECTION	0x00000001

Please set PERSPECTIVE_CORRECTION as the default value.
u32 mipmap_level Describes the MipMap texture level number.

0 mipmap_level 7

If MipMap is not used, please describe with the following flag:


NIFF2_NO_MIPMAP	0x00000000

The maximum level number for MipMap images created on the NIFF -> N64 converter is specified with TexImg -> mipmap_max_level.
u32 use_color_palette When color index texture is used, the color index texture can be created automatically just like with NIFF1.0 on the NIFF --> N64 converter, or it can be specified using the index texture image and color palette added to NIFF2.0. The following flags have been defined:

NIFF2_NO_USE_COLOR_PALETTE	0x00000000
NIFF2_USE_COLOR_PALETTE		0x00000001

If using the texture image just like on NIFF1.0, please specify NIFF2_NO_USE_COLOR_PALETTE.

If using the color index texture image and color palette newly added to NIFF2.0, please specify NIFF2_USE_COLOR_PALETTE. In this case, the tex_tile_img_index in TexDataArea points to a CiImgList index number, and tex_tile_img_num indicates the usable CiImg number.

u32 external_tex_img_num Describes the external file reference TexImg number.

When TexImg references an external file, all TexImg must reference external files.

In this case, please specify tex_img_index = 0xffffffff, tex_tile_img_num = 0x0.

In addition, when color index texture is used, ColorPalette also references external files.

If external files are not referenced, please specify 0x0.

u32 color_palette_index When use_color_palette = NIFF2_USE_COLOR_PALETTE, the usable color palettes are specified with a ColorPaletteList index number.

This area is not described when use_color_palette = 0.

When TEX_ANIM_OFF, the only thing described is color_palette_index(0).

u32 tlut_palette_number To use a 4bit color index texture and to specify a 256-color color palette, describe an offset value for a palette divided into 16 parts. In general, please describe 0x0.

If NIFF2_NO_USE_COLOR_PALETTE = 0x00000000, this field will not be described.

And, if 8bitCI texture (256 colors) is used as TexImg, this field will always be 0x0.

If 4bitCI texture and 16-color-palette are used, please describe a value of 0x0 in this field.

When TEX_ANIM_OFF, the only thing described is tlut_palette_number(0).

u32 external_tex_img_file_name_index When Texture Image references an external file, the reference file name is described with an ExternalNameList index number.

Please do not include the directory name etc. when describing the file name.

This area is not described if an external file is not referenced.

u32 external_tex_img_name_index When Texture Image references an external file, the reference TexImg name is described with an ExternalNameList index number.

This area is not described if an external file is not referenced.

u32 external_color_palette_file_name_index When ColorPalette references an external file, the reference file name is described with an ExternalNameList index number.

Please do not include the directory name etc. when describing the file name.

This area is not described if an external file is not referenced.

If NIFF2_NO_USE_COLOR_PALETTE = 0x00000000, this field will not be described.

u32 external_color_palette_name_index When ColorPalette references an external file, the reference ColorPalette name is described with an ExternalNameList index number.

This area is not described if an external file is not referenced.

If NIFF2_NO_USE_COLOR_PALETTE = 0x00000000, this field will not be described.

Go to the data chunk