Skip to main content

Texture2D(number width, number height, TextureFormat textureFormat = TextureFormat.RGBA32, number mipCount = -1, boolean linear = false)

Create a new empty texture.

Parameters:

NameTypeDescription
widthnumberTexture width
heightnumberTexture height
textureFormatTextureFormatTexture Format
mipCountnumbermip Count
linearbooleanIs linear?

Usage

---@type number
local width;

---@type number
local height;

---@type TextureFormat
local textureFormat;

---@type number
local mipCount;

---@type boolean
local linear;


local texture2d = Texture2D(width, height, textureFormat, mipCount, linear);