index / content / scripts / tex_util

Module content.scripts.tex_util🔗

global record TexUtil
enum TexType "CUBE_MAP" "THREED" "TWOD" "TWOD_ARRAY" end
enum MagFilterMode "LINEAR" "NEAREST" end
enum MinFilterMode "LINEAR" "LINEAR_MIPMAP_LINEAR" "LINEAR_MIPMAP_NEAREST" "NEAREST" "NEAREST_MIPMAP_NEAREST" end
enum WrapMode "CLAMP_TO_EDGE" "MIRROR_REPEAT" "REPEAT" end
record TextureDesc type: TexType fileName: string magFilter: MagFilterMode minFilter: MinFilterMode wrapS: WrapMode wrapT: WrapMode mipmapAlphaScale: number compressionAllowed: boolean redGreen: boolean scaleDownAllowed: boolean end
makeMaterialIndexTexture: function(fileName : string, wrapS : WrapMode, wrapT : WrapMode): TextureDesc makeTextureLinearClamp: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapRepeat: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapClamp: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapClampVertical: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc end

Category: globals🔗

TexUtil🔗

global record TexUtil
enum TexType "CUBE_MAP" "THREED" "TWOD" "TWOD_ARRAY" end
enum MagFilterMode "LINEAR" "NEAREST" end
enum MinFilterMode "LINEAR" "LINEAR_MIPMAP_LINEAR" "LINEAR_MIPMAP_NEAREST" "NEAREST" "NEAREST_MIPMAP_NEAREST" end
enum WrapMode "CLAMP_TO_EDGE" "MIRROR_REPEAT" "REPEAT" end
record TextureDesc type: TexType fileName: string magFilter: MagFilterMode minFilter: MinFilterMode wrapS: WrapMode wrapT: WrapMode mipmapAlphaScale: number compressionAllowed: boolean redGreen: boolean scaleDownAllowed: boolean end
makeMaterialIndexTexture: function(fileName : string, wrapS : WrapMode, wrapT : WrapMode): TextureDesc makeTextureLinearClamp: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapRepeat: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapClamp: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapClampVertical: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc end

TexUtil.TexType🔗

enum TexUtil.TexType "CUBE_MAP" "THREED" "TWOD" "TWOD_ARRAY" end

TexUtil.TexType."CUBE_MAP"🔗

Cube map texture

TexUtil.TexType."THREED"🔗

3D texture

TexUtil.TexType."TWOD"🔗

2D texture

TexUtil.TexType."TWOD_ARRAY"🔗

2D array texture

TexUtil.MagFilterMode🔗

enum TexUtil.MagFilterMode "LINEAR" "NEAREST" end

TexUtil.MagFilterMode."LINEAR"🔗

Linear magnification

TexUtil.MagFilterMode."NEAREST"🔗

Nearest-neighbor magnification

TexUtil.MinFilterMode🔗

enum TexUtil.MinFilterMode "LINEAR" "LINEAR_MIPMAP_LINEAR" "LINEAR_MIPMAP_NEAREST" "NEAREST" "NEAREST_MIPMAP_NEAREST" end

TexUtil.MinFilterMode."LINEAR"🔗

Linear minification

TexUtil.MinFilterMode."LINEAR_MIPMAP_LINEAR"🔗

Linear minification with linear mipmap interpolation

TexUtil.MinFilterMode."LINEAR_MIPMAP_NEAREST"🔗

Linear minification with nearest mipmap selection

TexUtil.MinFilterMode."NEAREST"🔗

Nearest-neighbor minification

TexUtil.MinFilterMode."NEAREST_MIPMAP_NEAREST"🔗

Nearest-neighbor minification with nearest mipmap selection

TexUtil.WrapMode🔗

enum TexUtil.WrapMode "CLAMP_TO_EDGE" "MIRROR_REPEAT" "REPEAT" end

TexUtil.WrapMode."CLAMP_TO_EDGE"🔗

Clamp to the edge of the texture

TexUtil.WrapMode."MIRROR_REPEAT"🔗

Mirror and repeat the texture

TexUtil.WrapMode."REPEAT"🔗

Repeat the texture

TexUtil.TextureDesc🔗

record TexUtil.TextureDesc type: TexType fileName: string magFilter: MagFilterMode minFilter: MinFilterMode wrapS: WrapMode wrapT: WrapMode mipmapAlphaScale: number compressionAllowed: boolean redGreen: boolean scaleDownAllowed: boolean end

TexUtil.TextureDesc.type🔗

TexUtil.TextureDesc.type: TexType

Texture dimensionality type

TexUtil.TextureDesc.fileName🔗

TexUtil.TextureDesc.fileName: string

Path to the texture file

TexUtil.TextureDesc.magFilter🔗

TexUtil.TextureDesc.magFilter: MagFilterMode

Magnification filter mode

TexUtil.TextureDesc.minFilter🔗

TexUtil.TextureDesc.minFilter: MinFilterMode

Minification filter mode

TexUtil.TextureDesc.wrapS🔗

TexUtil.TextureDesc.wrapS: WrapMode

Horizontal (S) wrap mode

TexUtil.TextureDesc.wrapT🔗

TexUtil.TextureDesc.wrapT: WrapMode

Vertical (T) wrap mode

TexUtil.TextureDesc.mipmapAlphaScale🔗

TexUtil.TextureDesc.mipmapAlphaScale: number

Alpha scale factor applied during mipmap generation

TexUtil.TextureDesc.compressionAllowed🔗

TexUtil.TextureDesc.compressionAllowed: boolean

Whether compression is allowed for this texture

TexUtil.TextureDesc.redGreen🔗

TexUtil.TextureDesc.redGreen: boolean

Whether to use only the red and green channels

TexUtil.TextureDesc.scaleDownAllowed🔗

TexUtil.TextureDesc.scaleDownAllowed: boolean

Whether the texture may be scaled down

TexUtil.makeMaterialIndexTexture🔗

function TexUtil.makeMaterialIndexTexture(fileName : string, wrapS : WrapMode, wrapT : WrapMode): TextureDesc

Create a material index texture description.

Parameters
  • fileName :string — path to the texture file
  • wrapS :WrapMode — horizontal wrap mode
  • wrapT :WrapMode — vertical wrap mode
Returns
  1. TextureDesc — texture description

TexUtil.makeTextureLinearClamp🔗

function TexUtil.makeTextureLinearClamp(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc

Create a linear-filtered, clamped texture description.

Parameters
  • 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
Returns
  1. TextureDesc — texture description

TexUtil.makeTextureMipmapRepeat🔗

function TexUtil.makeTextureMipmapRepeat(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc

Create a mipmapped, repeating texture description.

Parameters
  • 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
Returns
  1. TextureDesc — texture description

TexUtil.makeTextureMipmapClamp🔗

function TexUtil.makeTextureMipmapClamp(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc

Create a mipmapped, clamped texture description.

Parameters
  • 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
Returns
  1. TextureDesc — texture description

TexUtil.makeTextureMipmapClampVertical🔗

function TexUtil.makeTextureMipmapClampVertical(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc

Create a mipmapped, vertically-clamped texture description.

Parameters
  • 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
Returns
  1. TextureDesc — texture description
Transport Fever 3 Wiki
Gameplay ReferenceComing soon
●
Modding Manual
  • api
  • api.cmd
  • api.engine
  • api.engine.system
  • api.engine.util
  • api.gui
  • api.res
  • api.type
  • api.type.mod
  • api.type.modhub
  • api.type.transformator
  • app
  • main
  • content
    • base
      • difficulty_util
      • model_metadata_util
      • post_run_util
    • climates
      • gen
        • map_gen_util_serialized
    • game_mechanics
      • achievements
        • sound
          • achievement_sfx
      • celebrations
        • celebration_react_util
        • gui
          • sound
            • celebration_sfx
      • company
        • company
        • company_metadata
        • company_progression_util
        • company_react_util
        • company_static_util
        • company_util
        • explorations
          • exploration_plane
        • prospection_metadata
        • sound
          • company_sfx
      • emission
        • emission_config_metadata
        • emission_metadata
        • emissions
      • finance
        • account
        • finances_react_util
        • finances_util
        • loan
        • loan_util
        • sound
          • finance_sfx
      • fun_elements
        • blimp_util
        • custom_entity_util
        • fun_elements
        • rocket_util
        • ufo_util
      • game_time
        • game_time
      • industries
        • industries
      • notifications
        • gui
          • notification_colors
          • sound
            • notification_sfx
        • notification_legacy_util
        • notification_util
        • notifications
        • types
          • notification_react_util
          • notification_types
      • subventions
        • specific_subvention
        • subvention
        • subvention_legacy_util
        • subvention_util
        • subventions_gui
      • towns
        • district_colors
        • sound
          • town_sfx
        • town_cargo
        • town_growth_metadata
        • town_marketing_metadata
        • town_react_util
        • town_util
        • town_util_parallel
        • towns
    • gui
      • construction
        • construction_colors
        • construction_desc_react_util
        • construction_menu
        • construction_react_util
        • sound
          • construction_sfx
        • track_description_metadata
        • track_modifier_metadata
      • context_helper
        • context_helper
      • entity_window
        • animal
          • animal_eow
        • empty_construction
          • empty_construction_eow
        • entity_window_hud
        • entity_window_util
        • eow_extension_util
        • fun_elements
          • fun_elements_eow
        • gameplay_colors
        • industry
          • industry_eow
        • industry_react_util
        • line
          • line_eow
        • maintenance_station
          • maintenance_station_eow
        • perk
          • perk_eow
        • sim_person
          • sim_person_eow
        • station_group
          • station_group_eow
        • town
          • town_eow
        • town_building
          • town_building_eow
        • vehicle
          • vehicle_eow
        • view_manager
        • view_manager_util
        • warehouse
          • warehouse_eow
      • game_bar
        • game_bar
        • game_bar_widgets
      • guidesystem
        • sound
          • guidesystem_sfx
      • hud
        • hud_gui_config
        • hud_react_util
      • layers
        • layer_cargo
        • layer_cargo_flow
        • layer_colors
        • layer_noise
        • layer_pollution
        • layer_public_transport
        • layer_react_util
        • layer_traffic
        • layers_button_ridge
      • line_vehicle_mgmt
        • cargofilter_window
        • feedback_list_util
        • line
        • line_react_util
        • line_util
        • manager_hud_util
        • manager_tooltips_util
        • manager_window
        • sound
          • lvm_sfx
        • vehicle_list_react_util
        • vehicle_react_util
        • vehicle_store
        • vehicle_store_table
        • vehicle_store_util
        • vehicle_store_window
        • vehicle_util
      • main
        • button_react_util
        • callout_react_util
        • cargo_react_util
        • cargo_util
        • collapsible_checkbox_list
        • content_card
        • credits_react_util
        • default_colors
        • disable_features
        • engine_react_util
        • free_cam_options
        • game_context
        • game_react_globals
        • game_tooltips
        • game_windows
        • gui_react_util
        • gui_res_modding
        • hud_icon_toolbox
        • industry_util
        • input_action_colors
        • main_mod_button_area
        • menu_category_util
        • mod_entry_point
        • particle_colors
        • particle_react_util
        • popover_react_util
        • radial_menu_extension
        • script_param_util
        • selection_colors
        • selector
        • selector_react_util
        • styleutil
        • tile_list_react_util
        • tool_react_util
        • town_hud_react_util
      • map_editor
        • map_editor
      • menu
        • dialog_react_util
        • difficulty_react_util
        • graphics_presets_util
        • main_menu
        • map_preview_colors
        • menu_icon_react_util
        • menu_util
        • mod_colors
        • mod_manager_react_util
        • mod_util
        • new_game_react_util
        • paradox_react_util
        • releasenotes_util
        • savegame_react_util
        • sound
          • main_menu_sfx
      • sound
        • gui_comp_sfx
      • statistics
        • statistics
        • statistics_react_util
    • industries
      • industry_productivity_util
      • industry_workers
    • infrastructure
      • traffic_light
        • traffic_light
    • landmarks
      • hq
        • headquarter_util_serialized
      • landmark
      • landmark_util
      • landmark_util_serialized
    • mission
      • arrival_tracker
      • builder_util
      • calendar
      • guide_system
        • guide_system_react
        • guides
          • guide_event
          • guide_generic
          • guide_state
          • guide_timer
          • guide_ui_event
      • mission_boot_util
      • mission_colors
      • mission_framework
        • mission_end_window_util
        • mission_framework_react
        • mission_framework_react_util
        • mission_framework_util
        • mission_framework_util_entity
        • mission_framework_util_line
        • mission_interface
      • mission_pathfinding_util
      • mission_react_util
      • mission_task_util
      • mission_types
      • modifier
      • name_util
      • tasks
        • assign_vehicle
          • mission_task_assign_vehicle
          • mission_task_visit_stations_ordered
        • auto_builder
          • mission_task_electrify
          • mission_task_track_builder
          • prepare_track_building_util
        • build_construction
          • mission_task_build_construction
          • mission_task_build_construction_util
          • mission_task_build_construction_variant
        • build_path
          • mission_task_build_path
        • bulldoze
          • mission_task_auto_bulldoze
          • mission_task_bulldoze
        • buy_vehicle
          • mission_task_buy_vehicle
          • mission_task_clone_vehicle
        • click_and_collect_custom_entity
          • mission_task_collect_entity
          • mission_task_spawn_entity
        • click_entity
          • mission_task_click_entity
        • connect_nodes
          • mission_task_connect_nodes
        • create_line
          • mission_task_create_line
          • mission_task_create_line_for_towns
          • mission_task_stop_config
        • cutscene
          • mission_task_cutscene
        • dialogue
          • mission_task_dialogue
        • finish
          • mission_task_finish
        • guide
          • mission_task_guide
          • mission_task_guide_collect_entity
        • join
          • mission_task_join
        • mission_dialogue_data
        • non_bulldozable
          • mission_task_non_bulldozable
        • observe_entity
          • mission_task_observe_entity
        • page
          • mission_task_page
        • spawn_sims
          • mission_task_spawn_sims
          • sampling_util
        • subsidies
          • mission_task_guide_subsidies
          • mission_task_subsidies
        • task_decorator
        • town_rating
          • mission_task_town_rating
          • mission_task_town_rating_observer
        • town_size
          • mission_task_town_size
        • transfer_ownership
          • mission_task_transfer_ownership
          • transfer_ownership_util
        • transport_cargo
          • mission_task_empty_stocks
          • mission_task_industry_boosted
          • mission_task_transport_cargo
          • mission_task_transport_cargo_faster
          • mission_task_transport_cargo_observer
          • mission_task_transport_passengers
        • utility
          • mission_task_cargo_needs
          • mission_task_check_entities
          • mission_task_check_landmark_level
          • mission_task_clouds
          • mission_task_highlight
          • mission_task_industry_activity
          • mission_task_landmark_requirements
          • mission_task_play_sound
          • mission_task_protected_entities
          • mission_task_relay_update
          • mission_task_send_command
          • mission_task_send_event
          • mission_task_store_any
          • mission_task_substitute_constructions
          • mission_task_time_of_day
          • mission_task_town_development
          • mission_town_util
        • vehicle_util
          • mission_task_replace_vehicles
          • mission_task_sell_vehicles
          • mission_task_start_vehicles
          • mission_task_vehicle_modifier
          • mission_task_vehicle_position
          • mission_vehicle_util
        • wait
          • mission_task_wait
          • mission_task_wait_event
          • mission_task_wait_for
          • mission_task_wait_ui_event
        • waypoints
          • mission_task_waypoints
      • tutorial
        • tasks
          • mission_task_tutorial_init
        • tutorial_story_util
    • scripts
      • app_util
      • audio_util
      • builtin
      • construction
        • asset_util
        • collider_util_serialized
        • construction_config_metadata
        • construction_specialization_metadata
        • construction_util_serialized
        • lane_util_serialized
        • modules_util_serialized
        • param_util
        • street_util_serialized
      • entity_util
      • gamescript
      • journal
      • lang_util
      • log
      • mat4
      • math_util
      • metadata_util
      • polygon_util
      • random_util
      • react
      • soundset
      • string_util
      • table_util
      • tex_util
      • transformator_util
      • util
        • config_util
        • listutil
        • romberg_util
        • town_growth_function
      • vec2
      • vec3
      • vec4
    • stations
      • station_metadata
    • vehicle
      • vehicle_modifier

Generated 19-08-2026

Transport Fever 3 ● Urban Games © 2026