Home

NPOTTexturen

NPOTTexturen, or non-power-of-two textures, are textures whose width and height are not powers of two (for example 300x500). They are common in real-time graphics because they avoid padding to the next power-of-two and can simplify asset management, especially for irregular or dynamic sizes.

Historically, many graphics pipelines required textures to have dimensions that are powers of two to enable

Technical considerations for NPOT textures include mipmapping, filtering, and wrapping. If a texture is used with

Common use cases for NPOT textures include user interface elements, texture atlases with irregular sizes, and

features
like
mipmapping
and
certain
wrap
modes.
The
OpenGL
extension
ARB_texture_non_power_of_two
and
later
hardware
support
removed
many
of
these
restrictions,
enabling
NPOT
textures
with
full
capabilities
on
compatible
GPUs.
Today,
major
APIs
such
as
OpenGL,
DirectX,
and
Vulkan
offer
broad
NPOT
support.
In
WebGL,
NPOT
textures
are
supported
but
often
with
limitations
(for
example,
mipmaps
and
certain
wrap
modes
may
be
restricted
on
some
implementations).
mipmaps,
not
all
environments
support
NPOT
mipmapping
unless
the
hardware
and
API
provide
full
NPOT
support.
Wrap
modes
like
REPEAT
or
MIRRORED_REPEAT
are
also
dependent
on
the
API
and
hardware
capabilities,
especially
on
older
or
restricted
platforms.
In
general,
NPOT
textures
can
save
memory
when
the
texture
dimensions
are
not
close
to
a
power
of
two,
but
care
must
be
taken
to
ensure
the
target
platform’s
features
align
with
the
desired
sampling
and
wrapping
behavior.
Data
upload
also
requires
attention
to
alignment
and
row
stride,
but
NPOT
sizes
do
not
inherently
impose
different
constraints
from
POT
textures.
procedurally
generated
or
dynamically
sized
textures
where
padding
to
the
next
POT
would
be
wasteful.