Texel

2026/07/22

Type
Learning Resource
Format
Glossary Article
Version
General
Subject Tags
Code
MIT
Game Assets
2016-2026, GDQuest© - All rights reserved
All else
2016-2026, GDQuest© - All rights reserved
Created
2026/08/26
Updated
2026/07/22

Texel

A texel (short for texture pixel) is the fundamental unit of a texture.

While a pixel represents a single point of color data on a 2D screen display, a texel represents a single point of color (or data, such as depth or normals) stored within a texture.

The term texel is used in shader programming and graphics APIs to distinguish texture pixels from the pixels that are ultimately drawn on the screen. A single screen pixel may be generated from one texel, multiple texels, or even a fraction of a texel depending on how the texture is scaled and transformed.

Sampling and Coordinates

In a fragment shader, you are rarely access texels by their raw integer array index. Instead, you retrieve them using a Sampler via UV coordinates (normalized floating-point numbers between 0.0 and 1.0).

For example, the following code retrieves a texel at UVs (0.25, 0.50) from a texture:

vec4 color = texture(TEXTURE, vec2(0.25, 0.50));

If the provided texture size was, for example, 200x200px, the operation would try to retrieve the pixel at coordinates (50, 100), and the resulting color variable would contain the color of that pixel.

What if I want the exact pixel coordinate?

To get the actual pixel coordinate, you can multiply the UV coordinates by the texture's dimensions:

vec2 pixelCoord = vec2(0.25, 0.50) * TEXTURE_PIXEL_SIZE;

This is almost never useful, but is provided here to help understand how UV coordinates map to pixel coordinates.

Depending on the texture's filtering settings configured in Godot, the hardware will handle texels in one of two primary ways during sampling:

Become an Indie Gamedev with GDQuest!

Don't stop here. Step-by-step tutorials are fun but they only take you so far.

Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.

Nathan

Founder and teacher at GDQuest
  • Starter Kit
  • Learn Gamedev from Zero
Check out GDSchool

You're welcome in our little community

Get help from peers and pros on GDQuest's Discord server!

20,000 membersJoin Server

Contribute to GDQuest's Free Library

There are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!

Site in BETA!found a bug?