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
- Updated
- 2026/08/26
- 2026/07/22
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.
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.
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:
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.
Get help from peers and pros on GDQuest's Discord server!
20,000 membersJoin ServerThere are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!
Sponsor this library by learning gamedev with us onGDSchool
Learn MoreImprove and build on assets or suggest edits onGithub
Contributeshare this page and talk about GDQUest onRedditYoutubeTwitter…
Site in BETA!found a bug?