Difference between revisions of "NiTexturingPropertyGetTextureFilterMode"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(New page: This is a command from NifSE. '''Syntax''' (short:filterMode) NiTexturingPropertyGetTextureFilterMode short:texSlot short:nifID ''short:blockID'' (short:filterMode) ...)
 
imported>DragoonWraith
(→‎See Also: doesn't really make sense)
Line 23: Line 23:
== Note ==
== Note ==
* It is unknown if every filter mode will work correctly in Oblivion. Test carefully.
* It is unknown if every filter mode will work correctly in Oblivion. Test carefully.
== See Also ==
* [[:Category:NifSE (NiSourceTexture)|NiSourceTexture functions]]


[[Category:NifSE|TexturingPropertyGetTextureClampMode]]
[[Category:NifSE|TexturingPropertyGetTextureClampMode]]
[[Category:NifSE (NiTexturingProperty)|GetTextureClampMode]]
[[Category:NifSE (NiTexturingProperty)|GetTextureClampMode]]

Revision as of 08:19, 1 September 2010

This is a command from NifSE.

Syntax

(short:filterMode) NiTexturingPropertyGetTextureFilterMode short:texSlot short:nifID short:blockID
(short:filterMode) NiTexPropGetTexFilter short:texSlot short:nifID short:blockID

Returns a short value which indicates the filter mode of the NiTextureSource-derived block that is filling the specified texSlot. The texture slots range from 0 to NiTexturingPropertyGetTextureCount, and the possible choices are given below. See NiTexturingPropertyGetTextureCount 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 -1 if the function fails for whatever reason.

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

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