MCPcopy Create free account
hub / github.com/DentonW/DevIL / ChooseAlphaEndpoints

Function ChooseAlphaEndpoints

DevIL/src-IL/src/il_dds-save.cpp:1184–1197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1182
1183
1184void ChooseAlphaEndpoints(ILubyte *Block, ILubyte *a0, ILubyte *a1)
1185{
1186 ILuint i, Lowest = 0xFF, Highest = 0;
1187
1188 for (i = 0; i < 16; i++) {
1189 if (Block[i] < Lowest)
1190 Lowest = Block[i];
1191 if (Block[i] > Highest)
1192 Highest = Block[i];
1193 }
1194
1195 *a0 = Lowest;
1196 *a1 = Highest;
1197}
1198
1199
1200void CorrectEndDXT1(ILushort *ex0, ILushort *ex1, ILboolean HasAlpha)

Callers 1

CompressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected