What Does Swizzling Mean?

Swizzling, in the context of computer graphics, is the reordering of vector information in the pixel of an image in order to have it rendered quickly and more efficiently. This is because the swizzling is done in favor of the way that a specific graphics processing unit (GPU) or a CPU reads the pixel information, thereby lessening the overhead. The result is the same image that can be rendered much more quickly.


Techopedia Explains Swizzling

Swizzling is achieved by reordering the matrix of values that make up the vector information. It is done because different renderers and graphics processors access data in different ways and in different orders, so swizzling vector information to cater to this special way allows the programmer to use specific instructions that can process data faster. This may also help in organizing the data in memory to allow better use of texture caches. For example, the vector component c1.rgba may be swizzled into c2.abgr to remove a step that a graphics processor might take to reorder the data, making processing faster.

One drawback of swizzling is that it makes it more difficult to access the image data quickly since it has changed dramatically from its original form. So a swizzled image might be faster to process, but it is very difficult to edit after the fact.


Related Terms

Latest Software Development Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…