Implement interface to allow disabling IBL
This commit is contained in:
parent
b338a68eb4
commit
e3c408fc0e
@ -25,9 +25,20 @@
|
||||
|
||||
<div layout="horizontal-row" width="100%" proportion="1">
|
||||
<spacer width="70" height="10" />
|
||||
<label text="Shadows" I18N="Video settings"/>
|
||||
<spacer width="10" height="10"/>
|
||||
<gauge id="shadows" min_value="0" max_value="2" width="50%"/>
|
||||
|
||||
<div layout="horizontal-row" proportion="1" height="fit">
|
||||
<label text="Shadows" I18N="Video settings"/>
|
||||
<spacer width="10" height="10"/>
|
||||
<gauge id="shadows" min_value="0" max_value="2" proportion="1"/>
|
||||
</div>
|
||||
|
||||
<spacer height="4" width="10" />
|
||||
|
||||
<div layout="horizontal-row" proportion="1" height="fit">
|
||||
<checkbox id="ibl"/>
|
||||
<spacer width="10" height="10"/>
|
||||
<label text="Image-based lighting" I18N="Video settings"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<spacer height="4" width="10" />
|
||||
|
@ -92,6 +92,7 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
||||
shadows->setValue(0);
|
||||
getWidget<CheckBoxWidget>("dynamiclight")->setState(UserConfigParams::m_dynamic_lights);
|
||||
getWidget<CheckBoxWidget>("lightshaft")->setState(UserConfigParams::m_light_shaft);
|
||||
getWidget<CheckBoxWidget>("ibl")->setState(!UserConfigParams::m_degraded_IBL);
|
||||
getWidget<CheckBoxWidget>("global_illumination")->setState(UserConfigParams::m_gi);
|
||||
getWidget<CheckBoxWidget>("motionblur")->setState(UserConfigParams::m_motionblur);
|
||||
getWidget<CheckBoxWidget>("mlaa")->setState(UserConfigParams::m_mlaa);
|
||||
@ -150,6 +151,9 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
||||
UserConfigParams::m_light_shaft =
|
||||
advanced_pipeline && getWidget<CheckBoxWidget>("lightshaft")->getState();
|
||||
|
||||
UserConfigParams::m_degraded_IBL =
|
||||
!getWidget<CheckBoxWidget>("ibl")->getState();
|
||||
|
||||
UserConfigParams::m_gi =
|
||||
advanced_pipeline && CVS->supportsGlobalIllumination() &&
|
||||
getWidget<CheckBoxWidget>("global_illumination")->getState();
|
||||
@ -231,6 +235,7 @@ void CustomVideoSettingsDialog::updateActivation()
|
||||
getWidget<CheckBoxWidget>("mlaa")->setActivated();
|
||||
getWidget<CheckBoxWidget>("ssao")->setActivated();
|
||||
getWidget<CheckBoxWidget>("lightshaft")->setActivated();
|
||||
getWidget<CheckBoxWidget>("ibl")->setActivated();
|
||||
getWidget<CheckBoxWidget>("global_illumination")->setActivated();
|
||||
getWidget<CheckBoxWidget>("glow")->setActivated();
|
||||
getWidget<CheckBoxWidget>("bloom")->setActivated();
|
||||
@ -243,6 +248,7 @@ void CustomVideoSettingsDialog::updateActivation()
|
||||
getWidget<CheckBoxWidget>("mlaa")->setDeactivated();
|
||||
getWidget<CheckBoxWidget>("ssao")->setDeactivated();
|
||||
getWidget<CheckBoxWidget>("lightshaft")->setDeactivated();
|
||||
getWidget<CheckBoxWidget>("ibl")->setDeactivated();
|
||||
getWidget<CheckBoxWidget>("global_illumination")->setDeactivated();
|
||||
getWidget<CheckBoxWidget>("glow")->setDeactivated();
|
||||
getWidget<CheckBoxWidget>("bloom")->setDeactivated();
|
||||
|
@ -61,6 +61,7 @@ struct GFXPreset
|
||||
/** Depth of field */
|
||||
bool dof;
|
||||
bool global_illumination;
|
||||
bool degraded_ibl;
|
||||
};
|
||||
|
||||
static GFXPreset GFX_PRESETS[] =
|
||||
@ -69,35 +70,35 @@ static GFXPreset GFX_PRESETS[] =
|
||||
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
||||
false /* animatedScenery */, 0 /* animatedCharacters */, 0 /* anisotropy */,
|
||||
false /* depth of field */, false /* global illumination */
|
||||
false /* depth of field */, false /* global illumination */, true /* degraded IBL */
|
||||
},
|
||||
|
||||
{
|
||||
false /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, false /* weather */,
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */,
|
||||
false /* depth of field */, false /* global illumination */
|
||||
false /* depth of field */, false /* global illumination */, true /* degraded IBL */
|
||||
},
|
||||
|
||||
{
|
||||
true /* light */, 0 /* shadow */, false /* bloom */, false /* motionblur */,
|
||||
false /* lightshaft */, false /* glow */, false /* mlaa */, false /* ssao */, true /* weather */,
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */,
|
||||
false /* depth of field */, false /* global illumination */
|
||||
false /* depth of field */, false /* global illumination */, true /* degraded IBL */
|
||||
},
|
||||
|
||||
{
|
||||
true /* light */, 0 /* shadow */, false /* bloom */, true /* motionblur */,
|
||||
true /* lightshaft */, true /* glow */, true /* mlaa */, false /* ssao */, true /* weather */,
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 8 /* anisotropy */,
|
||||
false /* depth of field */, false /* global illumination */
|
||||
false /* depth of field */, false /* global illumination */, false /* degraded IBL */
|
||||
},
|
||||
|
||||
{
|
||||
true /* light */, 1024 /* shadow */, true /* bloom */, true /* motionblur */,
|
||||
true /* lightshaft */, true /* glow */, true /* mlaa */, true /* ssao */, true /* weather */,
|
||||
true /* animatedScenery */, 2 /* animatedCharacters */, 16 /* anisotropy */,
|
||||
true /* depth of field */, true /* global illumination */
|
||||
true /* depth of field */, true /* global illumination */, false /* degraded IBL */
|
||||
}
|
||||
};
|
||||
|
||||
@ -395,7 +396,8 @@ void OptionsScreenVideo::updateGfxSlider()
|
||||
GFX_PRESETS[l].ssao == UserConfigParams::m_ssao &&
|
||||
GFX_PRESETS[l].weather == UserConfigParams::m_weather_effects &&
|
||||
GFX_PRESETS[l].dof == UserConfigParams::m_dof &&
|
||||
GFX_PRESETS[l].global_illumination == UserConfigParams::m_gi)
|
||||
GFX_PRESETS[l].global_illumination == UserConfigParams::m_gi &&
|
||||
GFX_PRESETS[l].degraded_ibl == UserConfigParams::m_degraded_IBL)
|
||||
{
|
||||
gfx->setValue(l + 1);
|
||||
found = true;
|
||||
@ -567,6 +569,7 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
||||
UserConfigParams::m_weather_effects = GFX_PRESETS[level].weather;
|
||||
UserConfigParams::m_dof = GFX_PRESETS[level].dof;
|
||||
UserConfigParams::m_gi = GFX_PRESETS[level].global_illumination;
|
||||
UserConfigParams::m_degraded_IBL = GFX_PRESETS[level].degraded_ibl;
|
||||
|
||||
updateGfxSlider();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user