Merge pull request #44683 from madmiraal/fix-etc-quality-3.2
[3.2] Fix ETC quality setting
This commit is contained in:
commit
93172515de
|
@ -199,14 +199,15 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
|
||||||
// prepare parameters to be passed to etc2comp
|
// prepare parameters to be passed to etc2comp
|
||||||
int num_cpus = OS::get_singleton()->get_processor_count();
|
int num_cpus = OS::get_singleton()->get_processor_count();
|
||||||
int encoding_time = 0;
|
int encoding_time = 0;
|
||||||
|
|
||||||
float effort = 0.0; //default, reasonable time
|
float effort = 0.0; //default, reasonable time
|
||||||
|
|
||||||
if (p_lossy_quality > 0.75)
|
if (p_lossy_quality > 0.95)
|
||||||
effort = 0.4;
|
effort = 80;
|
||||||
else if (p_lossy_quality > 0.85)
|
else if (p_lossy_quality > 0.85)
|
||||||
effort = 0.6;
|
effort = 60;
|
||||||
else if (p_lossy_quality > 0.95)
|
else if (p_lossy_quality > 0.75)
|
||||||
effort = 0.8;
|
effort = 40;
|
||||||
|
|
||||||
Etc::ErrorMetric error_metric = Etc::ErrorMetric::RGBX; // NOTE: we can experiment with other error metrics
|
Etc::ErrorMetric error_metric = Etc::ErrorMetric::RGBX; // NOTE: we can experiment with other error metrics
|
||||||
Etc::Image::Format etc2comp_etc_format = _image_format_to_etc2comp_format(etc_format);
|
Etc::Image::Format etc2comp_etc_format = _image_format_to_etc2comp_format(etc_format);
|
||||||
|
|
Loading…
Reference in New Issue