MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / SetQualityBC7

Function SetQualityBC7

cmp_core/shaders/bc7_encode_kernel.cpp:3477–3495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3475}
3476
3477int CMP_CDECL SetQualityBC7(void* options, CGU_FLOAT fquality)
3478{
3479 if (!options)
3480 return CGU_CORE_ERR_INVALIDPTR;
3481
3482 BC7_Encode* BC7optionsDefault = (BC7_Encode*)options;
3483 if (fquality < 0.0f)
3484 fquality = 0.0f;
3485 else if (fquality > 1.0f)
3486 fquality = 1.0f;
3487 BC7optionsDefault->quality = fquality;
3488
3489 // Set Error Thresholds
3490 BC7optionsDefault->errorThreshold = BC7optionsDefault->maxThreshold * (1.0f - fquality);
3491 if (fquality > BC7_qFAST_THRESHOLD)
3492 BC7optionsDefault->errorThreshold += BC7optionsDefault->minThreshold;
3493
3494 return CGU_CORE_OK;
3495}
3496
3497int CMP_CDECL SetMaskBC7(void* options, CGU_UINT8 mask)
3498{

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68