Skip to content

Texture Utils

Popax21 edited this page Sep 24, 2022 · 2 revisions

TextureHeap

A helper class which can be used to pack multiple smaller TextureData instances into one big atlas.

TexturePartitioning

Keeps track of a partitioning of the texture. This assigns each pixel a partition (represented by its ID), and provides helper methods to manipulate this mapping. Its intended purpose is to help split a texture into its components, which can be used to selectively modify a few targeted partitions at the time.

TexturePartitioning.CreateColorComponentPartitions is a helper method which can be used to create a partitioning where each partition consists of a group of adjacent similarly colored pixels.

ScaledMTexture

An MTexture subclass which allows one to specify a Vector2 by which to scale the texture before drawing it.