NiTexturingPropertySetTextureFilterMode

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

This is a command from NifSE.

Syntax

(bool:success) NiTexturingPropertySetTextureFilterMode short:filterMode short:texSlot short:nifID short:blockID
(bool:success) NiTexPropSetTexFilter short:filterMode short:texSlot short:nifID short:blockID

Sets the filter mode of the NiTextureSource-derived block that is filling the specified texSlot. The texture slots range from 0 to NiTexturingPropertySetTextureCount, and the possible choices are given below. See NiTexturingPropertySetTextureCount for more details.

The possible values for filter mode tell how the pixels of the texture are blended together when textures are displayed at a size other than their original dimensions. The available filter modes are:

0 = FILTER_NEAREST - simply uses the nearest pixel, very grainy
1 = FILTER_BILERP - bilinear filtering
2 = FILTER_TRILERP - trilinear filtering
3 = FILTER_NEAREST_MIPNEAREST - uses the nearest pixel from the MipMap that is closest to the display size
4 = FILTER_NEAREST_MIPLERP - linearly blends the two MipMaps closest to the display size, and then uses the nearest pixel in the blend
5 = FILTER_BILERP_MIPNEAREST - uses bilinear filtering on the MipMap that is closest to the display size

Returns 0 if the function fails for whatever reason, 1 otherwise.

The default value of blockID, 0, indicates the NIF's root, a NiNode. NiNode blocks are not derived from NiTexturingProperty, so this function will always require an explicit blockID.

Texture Slots

  • BASE_MAP = 0 - a.k.a. the color map
  • DARK_MAP = 1
  • DETAIL_MAP = 2
  • GLOSS_MAP = 3
  • GLOW_MAP = 4
  • BUMP_MAP = 5
  • NORMAL_MAP = 6
  • UNKNOWN2_MAP = 7
  • DECAL_0_MAP = 8
  • DECAL_1_MAP = 9
  • DECAL_2_MAP = 10
  • DECAL_3_MAP = 11

Note[edit | edit source]

  • It is unknown if every filter mode will work correctly in Oblivion. Test carefully.

See Also[edit | edit source]