Zum Inhalt

tex_util

Quelle: base/tealdef/scripts/tex_util.d.tl

Hinweise

Typen von /scripts/tex_util.tl (TexUtil). Die Helfer bauen Texturbeschreibungen mit üblichen Filter- und Wrap-Einstellungen.

TexUtil

record global base/tealdef/scripts/tex_util.d.tl:3

global record TexUtil

Laden: local tu = require "::/scripts/tex_util.tl" as TexUtil

Hinweise

Helfer für Texturbeschreibungen, die ug_require "/scripts/tex_util.tl" zurückgibt.

Funktionen

makeMaterialIndexTexture(fileName : string, wrapS : WrapMode, wrapT : WrapMode) : TextureDesc base/tealdef/scripts/tex_util.d.tl:72

Aufruf: tu.makeMaterialIndexTexture(…)

Create a material index texture description.

Parameter Typ Beschreibung
fileName string path to the texture file
wrapS WrapMode horizontal wrap mode
wrapT WrapMode vertical wrap mode

Rückgabe TextureDesc: texture description

Im Basisspiel verwendet: 792-mal in 792 Dateien

base/content/assets/rocks/shared/shared/gtex/rock_ground_large.gtex.lua:5

texture = tu.makeMaterialIndexTexture("tex/rock_ground.tga", "CLAMP_TO_EDGE", "CLAMP_TO_EDGE"),
base/content/assets/rocks/shared/shared/gtex/rock_ground_large_brown_grass.gtex.lua:5
texture = tu.makeMaterialIndexTexture("tex/rock_ground.tga", "CLAMP_TO_EDGE", "CLAMP_TO_EDGE"),
base/content/assets/rocks/shared/shared/gtex/rock_ground_medium.gtex.lua:5
texture = tu.makeMaterialIndexTexture("tex/rock_ground.tga", "CLAMP_TO_EDGE", "CLAMP_TO_EDGE"),
base/content/assets/rocks/shared/shared/gtex/rock_ground_medium_brown_grass.gtex.lua:5
texture = tu.makeMaterialIndexTexture("tex/rock_ground.tga", "CLAMP_TO_EDGE", "CLAMP_TO_EDGE"),
base/content/assets/rocks/shared/shared/gtex/rock_ground_small.gtex.lua:5
texture = tu.makeMaterialIndexTexture("tex/rock_ground.tga", "CLAMP_TO_EDGE", "CLAMP_TO_EDGE"),
base/content/assets/rocks/shared/shared/gtex/rock_ground_small_brown_grass.gtex.lua:5
texture = tu.makeMaterialIndexTexture("tex/rock_ground.tga", "CLAMP_TO_EDGE", "CLAMP_TO_EDGE"),
… und 786 weitere Dateien.

makeTextureLinearClamp(fileName : string, compressionAllowed : boolean, scaleDownAllowed? : boolean, redGreen? : boolean, texType? : TexType) : TextureDesc base/tealdef/scripts/tex_util.d.tl:80

Aufruf: tu.makeTextureLinearClamp(…)

Create a linear-filtered, clamped texture description.

Parameter Typ Beschreibung
fileName string path to the texture file
compressionAllowed boolean whether compression is allowed
scaleDownAllowed? boolean whether the texture may be scaled down
redGreen? boolean whether to use only red and green channels
texType? TexType texture dimensionality type

Rückgabe TextureDesc: texture description

makeTextureMipmapRepeat(fileName : string, compressionAllowed : boolean, scaleDownAllowed? : boolean, redGreen? : boolean, texType? : TexType) : TextureDesc base/tealdef/scripts/tex_util.d.tl:88

Aufruf: tu.makeTextureMipmapRepeat(…)

Create a mipmapped, repeating texture description.

Parameter Typ Beschreibung
fileName string path to the texture file
compressionAllowed boolean whether compression is allowed
scaleDownAllowed? boolean whether the texture may be scaled down
redGreen? boolean whether to use only red and green channels
texType? TexType texture dimensionality type

Rückgabe TextureDesc: texture description

makeTextureMipmapClamp(fileName : string, compressionAllowed : boolean, scaleDownAllowed? : boolean, redGreen? : boolean, texType? : TexType) : TextureDesc base/tealdef/scripts/tex_util.d.tl:96

Aufruf: tu.makeTextureMipmapClamp(…)

Create a mipmapped, clamped texture description.

Parameter Typ Beschreibung
fileName string path to the texture file
compressionAllowed boolean whether compression is allowed
scaleDownAllowed? boolean whether the texture may be scaled down
redGreen? boolean whether to use only red and green channels
texType? TexType texture dimensionality type

Rückgabe TextureDesc: texture description

makeTextureMipmapClampVertical(fileName : string, compressionAllowed : boolean, scaleDownAllowed? : boolean, redGreen? : boolean, texType? : TexType) : TextureDesc base/tealdef/scripts/tex_util.d.tl:104

Aufruf: tu.makeTextureMipmapClampVertical(…)

Create a mipmapped, vertically-clamped texture description.

Parameter Typ Beschreibung
fileName string path to the texture file
compressionAllowed boolean whether compression is allowed
scaleDownAllowed? boolean whether the texture may be scaled down
redGreen? boolean whether to use only red and green channels
texType? TexType texture dimensionality type

Rückgabe TextureDesc: texture description

TexUtil.TexType

enum base/tealdef/scripts/tex_util.d.tl:4

enum TexType

Hinweise

Dimension der Textur.

Im Basisspiel verwendet: 5-mal in 1 Datei

base/content/scripts/scripts/tex_util.tl:13

texType? : TexUtil.TexType)

Wert Beschreibung
"TWOD" 2D texture
"CUBE_MAP" Cube map texture
"TWOD_ARRAY" 2D array texture
"THREED" 3D texture

TexUtil.MagFilterMode

enum base/tealdef/scripts/tex_util.d.tl:15

enum MagFilterMode

Hinweise

Vergrößerungsfilter.

Im Basisspiel verwendet: 1-mal in 1 Datei

base/content/scripts/scripts/tex_util.tl:5

magFilter : TexUtil.MagFilterMode,

Wert Beschreibung
"NEAREST" Nearest-neighbor magnification
"LINEAR" Linear magnification

TexUtil.MinFilterMode

enum base/tealdef/scripts/tex_util.d.tl:22

enum MinFilterMode

Hinweise

Verkleinerungsfilter, wahlweise mit Mipmaps.

Im Basisspiel verwendet: 1-mal in 1 Datei

base/content/scripts/scripts/tex_util.tl:6

minFilter : TexUtil.MinFilterMode,

Wert Beschreibung
"NEAREST" Nearest-neighbor minification
"LINEAR" Linear minification
"LINEAR_MIPMAP_LINEAR" Linear minification with linear mipmap interpolation
"LINEAR_MIPMAP_NEAREST" Linear minification with nearest mipmap selection
"NEAREST_MIPMAP_NEAREST" Nearest-neighbor minification with nearest mipmap selection

TexUtil.WrapMode

enum base/tealdef/scripts/tex_util.d.tl:35

enum WrapMode

Hinweise

Verhalten der Texturkoordinaten am Rand (Wrapping).

Im Basisspiel verwendet: 4-mal in 1 Datei

base/content/scripts/scripts/tex_util.tl:7

wrapS : TexUtil.WrapMode,

Wert Beschreibung
"REPEAT" Repeat the texture
"CLAMP_TO_EDGE" Clamp to the edge of the texture
"MIRROR_REPEAT" Mirror and repeat the texture

TexUtil.TextureDesc

record base/tealdef/scripts/tex_util.d.tl:44

record TextureDesc

Hinweise

Beschreibung einer Textur: Datei, Filterung, Wrapping und Kompression.

Im Basisspiel verwendet: 6-mal in 1 Datei

base/content/scripts/scripts/tex_util.tl:14

: TexUtil.TextureDesc

Felder

Name Typ Beschreibung
type TexType Texture dimensionality type
fileName string Path to the texture file
magFilter MagFilterMode Magnification filter mode
minFilter MinFilterMode Minification filter mode
wrapS WrapMode Horizontal (S) wrap mode
wrapT WrapMode Vertical (T) wrap mode
mipmapAlphaScale number Alpha scale factor applied during mipmap generation
compressionAllowed boolean Whether compression is allowed for this texture
redGreen boolean Whether to use only the red and green channels
scaleDownAllowed boolean Whether the texture may be scaled down