texture_get_texel_height

Get the height of a single texel for a texture page.

Syntax:

GML Code Example

texture_get_texel_height(tex);


Argument Description
tex The texture asset to use


Returns: Real


Description

A texel, or texture element is the fundamental unit of texture space used in computer graphics. Textures are represented by arrays of texels, just as pictures are represented by arrays of pixels, and this function returns the height of a single texel from the texture page of the image asset used.


Example:

GML Code Example

var tex = sprite_get_texture(sprite_index, 0);
 tex_w = texture_get_texel_width(tex);
 tex_h = texture_get_texel_height(tex);
 

The above code will get the texel width and height of the texture taken from a sprite asset.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here