MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / swz_texel

Function swz_texel

Source/astcenc_image.cpp:108–119  ·  view source on GitHub ↗

* @brief Swizzle a texel into a new arrangement. * * @param data The source RGBA vector to swizzle. * @param swz The swizzle to use. */

Source from the content-addressed store, hash-verified

106 * @param swz The swizzle to use.
107 */
108static vfloat4 swz_texel(
109 vfloat4 data,
110 const astcenc_swizzle& swz
111) {
112 ASTCENC_ALIGNAS float datas[6];
113
114 storea(data, datas);
115 datas[ASTCENC_SWZ_0] = 0.0f;
116 datas[ASTCENC_SWZ_1] = 1.0f;
117
118 return vfloat4(datas[swz.r], datas[swz.g], datas[swz.b], datas[swz.a]);
119}
120
121/**
122 * @brief Encode a texel that is entirely LDR linear.

Callers

nothing calls this directly

Calls 2

storeaFunction · 0.70
vfloat4Class · 0.70

Tested by

no test coverage detected