This commit is contained in:
Alayan 2024-05-12 12:45:26 +02:00
parent 3ec2b9a54d
commit 53b6267d9d
No known key found for this signature in database
3 changed files with 27 additions and 13 deletions

View File

@ -156,7 +156,7 @@
<div layout="horizontal-row" width="100%" proportion="1"> <div layout="horizontal-row" width="100%" proportion="1">
<label text="Rendered image quality" I18N="Video settings" width="40%"/> <label text="Rendered image quality" I18N="Video settings" width="40%"/>
<spacer width="10" height="10"/> <spacer width="10" height="10"/>
<gauge id="image_quality" min_value="0" max_value="2" width="50%" /> <gauge id="image_quality" min_value="0" max_value="3" width="50%" />
</div> </div>
<spacer height="4" width="10" /> <spacer height="4" width="10" />

View File

@ -95,6 +95,7 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
SpinnerWidget* filtering = getWidget<SpinnerWidget>("image_quality"); SpinnerWidget* filtering = getWidget<SpinnerWidget>("image_quality");
filtering->addLabel(_("Very Low")); filtering->addLabel(_("Very Low"));
filtering->addLabel(_("Low")); filtering->addLabel(_("Low"));
filtering->addLabel(_("Medium"));
filtering->addLabel(_("High")); filtering->addLabel(_("High"));
filtering->setValue(OptionsScreenVideo::getImageQuality()); filtering->setValue(OptionsScreenVideo::getImageQuality());

View File

@ -50,7 +50,7 @@ void OptionsScreenVideo::initPresets()
({ ({
false /* light */, 0 /* shadow */, false /* bloom */, false /* lightshaft */, false /* light */, 0 /* shadow */, false /* bloom */, false /* lightshaft */,
false /* glow */, false /* mlaa */, false /* ssao */, false /* light scatter */, false /* glow */, false /* mlaa */, false /* ssao */, false /* light scatter */,
true /* animatedCharacters */, 2 /* particles */, 0 /* image_quality */, true /* animatedCharacters */, 2 /* particles */, 1 /* image_quality */,
true /* degraded IBL */, 1 /* Geometry Detail */ true /* degraded IBL */, 1 /* Geometry Detail */
}); });
@ -66,7 +66,7 @@ void OptionsScreenVideo::initPresets()
({ ({
true /* light */, 0 /* shadow */, false /* bloom */, true /* lightshaft */, true /* light */, 0 /* shadow */, false /* bloom */, true /* lightshaft */,
true /* glow */, true /* mlaa */, false /* ssao */, true /* light scatter */, true /* glow */, true /* mlaa */, false /* ssao */, true /* light scatter */,
true /* animatedCharacters */, 2 /* particles */, 1 /* image_quality */, true /* animatedCharacters */, 2 /* particles */, 2 /* image_quality */,
false /* degraded IBL */, 3 /* Geometry Detail */ false /* degraded IBL */, 3 /* Geometry Detail */
}); });
@ -74,7 +74,7 @@ void OptionsScreenVideo::initPresets()
({ ({
true /* light */, 512 /* shadow */, true /* bloom */, true /* lightshaft */, true /* light */, 512 /* shadow */, true /* bloom */, true /* lightshaft */,
true /* glow */, true /* mlaa */, false /* ssao */, true /* light scatter */, true /* glow */, true /* mlaa */, false /* ssao */, true /* light scatter */,
true /* animatedCharacters */, 2 /* particles */, 2 /* image_quality */, true /* animatedCharacters */, 2 /* particles */, 3 /* image_quality */,
false /* degraded IBL */, 3 /* Geometry Detail */ false /* degraded IBL */, 3 /* Geometry Detail */
}); });
@ -82,7 +82,7 @@ void OptionsScreenVideo::initPresets()
({ ({
true /* light */, 1024 /* shadow */, true /* bloom */, true /* lightshaft */, true /* light */, 1024 /* shadow */, true /* bloom */, true /* lightshaft */,
true /* glow */, true /* mlaa */, true /* ssao */, true /* light scatter */, true /* glow */, true /* mlaa */, true /* ssao */, true /* light scatter */,
true /* animatedCharacters */, 2 /* particles */, 2 /* image_quality */, true /* animatedCharacters */, 2 /* particles */, 3 /* image_quality */,
false /* degraded IBL */, 4 /* Geometry Detail */ false /* degraded IBL */, 4 /* Geometry Detail */
}); });
@ -122,18 +122,22 @@ void OptionsScreenVideo::initPresets()
// -------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------
int OptionsScreenVideo::getImageQuality() int OptionsScreenVideo::getImageQuality()
{ {
if (UserConfigParams::m_anisotropic == 2 && if (UserConfigParams::m_anisotropic == 4 &&
(UserConfigParams::m_high_definition_textures & 0x01) == 0x00 && (UserConfigParams::m_high_definition_textures & 0x01) == 0x00 &&
UserConfigParams::m_hq_mipmap == false) UserConfigParams::m_hq_mipmap == false)
return 0; return 0;
if (UserConfigParams::m_anisotropic == 4 && if (UserConfigParams::m_anisotropic == 16 &&
(UserConfigParams::m_high_definition_textures & 0x01) == 0x01 && (UserConfigParams::m_high_definition_textures & 0x01) == 0x00 &&
UserConfigParams::m_hq_mipmap == false) UserConfigParams::m_hq_mipmap == false)
return 1; return 1;
if (UserConfigParams::m_anisotropic == 16 && if (UserConfigParams::m_anisotropic == 16 &&
(UserConfigParams::m_high_definition_textures & 0x01) == 0x01 && (UserConfigParams::m_high_definition_textures & 0x01) == 0x01 &&
UserConfigParams::m_hq_mipmap == true) UserConfigParams::m_hq_mipmap == false)
return 2; return 2;
if (UserConfigParams::m_anisotropic == 16 &&
(UserConfigParams::m_high_definition_textures & 0x01) == 0x01 &&
UserConfigParams::m_hq_mipmap == true)
return 3;
return 1; return 1;
} // getImageQuality } // getImageQuality
@ -147,20 +151,27 @@ void OptionsScreenVideo::setImageQuality(int quality)
switch (quality) switch (quality)
{ {
case 0: case 0:
UserConfigParams::m_anisotropic = 2; UserConfigParams::m_anisotropic = 4;
UserConfigParams::m_high_definition_textures = 0x02; UserConfigParams::m_high_definition_textures = 0x02;
UserConfigParams::m_hq_mipmap = false; UserConfigParams::m_hq_mipmap = false;
if (td) if (td)
td->setSamplerUse(GE::GVS_3D_MESH_MIPMAP_2); td->setSamplerUse(GE::GVS_3D_MESH_MIPMAP_2);
break; break;
case 1: case 1:
UserConfigParams::m_anisotropic = 4; UserConfigParams::m_anisotropic = 16;
UserConfigParams::m_high_definition_textures = 0x02;
UserConfigParams::m_hq_mipmap = false;
if (td)
td->setSamplerUse(GE::GVS_3D_MESH_MIPMAP_2);
break;
case 2:
UserConfigParams::m_anisotropic = 16;
UserConfigParams::m_high_definition_textures = 0x03; UserConfigParams::m_high_definition_textures = 0x03;
UserConfigParams::m_hq_mipmap = false; UserConfigParams::m_hq_mipmap = false;
if (td) if (td)
td->setSamplerUse(GE::GVS_3D_MESH_MIPMAP_4); td->setSamplerUse(GE::GVS_3D_MESH_MIPMAP_4);
break; break;
case 2: case 3:
UserConfigParams::m_anisotropic = 16; UserConfigParams::m_anisotropic = 16;
UserConfigParams::m_high_definition_textures = 0x03; UserConfigParams::m_high_definition_textures = 0x03;
UserConfigParams::m_hq_mipmap = true; UserConfigParams::m_hq_mipmap = true;
@ -483,7 +494,9 @@ void OptionsScreenVideo::updateTooltip()
//I18N: in graphical options //I18N: in graphical options
int quality = getImageQuality(); int quality = getImageQuality();
tooltip = tooltip + L"\n" + _("Rendered image quality: %s", tooltip = tooltip + L"\n" + _("Rendered image quality: %s",
quality == 0 ? very_low : quality == 1 ? low : high); quality == 0 ? very_low :
quality == 1 ? low :
quality == 2 ? medium : high);
//I18N: in graphical options //I18N: in graphical options
int geometry_detail = (UserConfigParams::m_geometry_level == 0 ? 2 : int geometry_detail = (UserConfigParams::m_geometry_level == 0 ? 2 :