Enable a higher maximum shadow resolution in the video settings
This commit is contained in:
parent
95c8f452de
commit
ec4f4065f5
@ -29,7 +29,7 @@
|
|||||||
<div layout="horizontal-row" proportion="1" height="fit">
|
<div layout="horizontal-row" proportion="1" height="fit">
|
||||||
<label text="Shadows" I18N="Video settings"/>
|
<label text="Shadows" I18N="Video settings"/>
|
||||||
<spacer width="10" height="10"/>
|
<spacer width="10" height="10"/>
|
||||||
<gauge id="shadows" min_value="0" max_value="2" proportion="1"/>
|
<gauge id="shadows" min_value="0" max_value="3" proportion="1"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -101,8 +101,11 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
|||||||
SpinnerWidget* shadows = getWidget<SpinnerWidget>("shadows");
|
SpinnerWidget* shadows = getWidget<SpinnerWidget>("shadows");
|
||||||
shadows->addLabel(_("Disabled")); // 0
|
shadows->addLabel(_("Disabled")); // 0
|
||||||
shadows->addLabel(_("Low")); // 1
|
shadows->addLabel(_("Low")); // 1
|
||||||
shadows->addLabel(_("High")); // 2
|
shadows->addLabel(_("Medium")); // 2
|
||||||
shadows->setValue(UserConfigParams::m_shadows_resolution / 512);
|
shadows->addLabel(_("High")); // 3
|
||||||
|
shadows->setValue(UserConfigParams::m_shadows_resolution == 2048 ? 3 :
|
||||||
|
UserConfigParams::m_shadows_resolution == 1024 ? 2 :
|
||||||
|
UserConfigParams::m_shadows_resolution == 512 ? 1 : 0);
|
||||||
|
|
||||||
getWidget<CheckBoxWidget>("dynamiclight")->setState(UserConfigParams::m_dynamic_lights);
|
getWidget<CheckBoxWidget>("dynamiclight")->setState(UserConfigParams::m_dynamic_lights);
|
||||||
getWidget<CheckBoxWidget>("lightshaft")->setState(UserConfigParams::m_light_shaft);
|
getWidget<CheckBoxWidget>("lightshaft")->setState(UserConfigParams::m_light_shaft);
|
||||||
@ -156,7 +159,9 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
|||||||
if (advanced_pipeline)
|
if (advanced_pipeline)
|
||||||
{
|
{
|
||||||
UserConfigParams::m_shadows_resolution =
|
UserConfigParams::m_shadows_resolution =
|
||||||
getWidget<SpinnerWidget>("shadows")->getValue() * 512;
|
getWidget<SpinnerWidget>("shadows")->getValue() == 1 ? 512 :
|
||||||
|
getWidget<SpinnerWidget>("shadows")->getValue() == 2 ? 1024 :
|
||||||
|
getWidget<SpinnerWidget>("shadows")->getValue() == 3 ? 2048 : 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user