Add GI to video options
This commit is contained in:
parent
aa0691015a
commit
5e132f7410
@ -55,9 +55,20 @@
|
||||
|
||||
<div layout="horizontal-row" width="100%" proportion="1">
|
||||
<spacer width="70" height="10"/>
|
||||
<checkbox id="ssao"/>
|
||||
<spacer width="10" height="10"/>
|
||||
<label text="Ambient Occlusion" I18N="Video settings"/>
|
||||
|
||||
<div layout="horizontal-row" proportion="1" height="fit">
|
||||
<checkbox id="ssao"/>
|
||||
<spacer width="10" height="10"/>
|
||||
<label text="Ambient Occlusion" I18N="Video settings"/>
|
||||
</div>
|
||||
|
||||
<spacer height="4" width="10" />
|
||||
|
||||
<div layout="horizontal-row" proportion="1" height="fit">
|
||||
<checkbox id="global_illumination"/>
|
||||
<spacer width="10" height="10"/>
|
||||
<label text="Global illumination" I18N="Video settings"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<spacer height="20" width="10" />
|
||||
|
@ -87,6 +87,7 @@ void CustomVideoSettingsDialog::beforeAddingWidgets()
|
||||
|
||||
getWidget<CheckBoxWidget>("dynamiclight")->setState(UserConfigParams::m_dynamic_lights);
|
||||
getWidget<CheckBoxWidget>("lightshaft")->setState(UserConfigParams::m_light_shaft);
|
||||
getWidget<CheckBoxWidget>("global_illumination")->setState(UserConfigParams::m_gi);
|
||||
getWidget<CheckBoxWidget>("motionblur")->setState(UserConfigParams::m_motionblur);
|
||||
getWidget<CheckBoxWidget>("mlaa")->setState(UserConfigParams::m_mlaa);
|
||||
getWidget<CheckBoxWidget>("glow")->setState(UserConfigParams::m_glow);
|
||||
@ -139,6 +140,9 @@ GUIEngine::EventPropagation CustomVideoSettingsDialog::processEvent(const std::s
|
||||
UserConfigParams::m_light_shaft =
|
||||
getWidget<CheckBoxWidget>("lightshaft")->getState();
|
||||
|
||||
UserConfigParams::m_gi =
|
||||
getWidget<CheckBoxWidget>("global_illumination")->getState();
|
||||
|
||||
UserConfigParams::m_glow =
|
||||
getWidget<CheckBoxWidget>("glow")->getState();
|
||||
|
||||
|
@ -61,6 +61,7 @@ struct GFXPreset
|
||||
int anisotropy;
|
||||
/** Depth of field */
|
||||
bool dof;
|
||||
bool global_illumination;
|
||||
};
|
||||
|
||||
static GFXPreset GFX_PRESETS[] =
|
||||
@ -68,31 +69,36 @@ 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 /* animatedScenery */, 0 /* animatedCharacters */, 0 /* anisotropy */,
|
||||
false /* depth of field */, false /* global illumination */
|
||||
},
|
||||
|
||||
{
|
||||
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 */
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */,
|
||||
false /* depth of field */, false /* global illumination */
|
||||
},
|
||||
|
||||
{
|
||||
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 */
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 4 /* anisotropy */,
|
||||
false /* depth of field */, false /* global illumination */
|
||||
},
|
||||
|
||||
{
|
||||
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 */
|
||||
true /* animatedScenery */, 1 /* animatedCharacters */, 8 /* anisotropy */,
|
||||
false /* depth of field */, false /* global illumination */
|
||||
},
|
||||
|
||||
{
|
||||
true /* light */, 2 /* shadow */, true /* bloom */, true /* motionblur */,
|
||||
true /* lightshaft */, true /* glow */, true /* mlaa */, true /* ssao */, true /* weather */,
|
||||
true /* animatedScenery */, 2 /* animatedCharacters */, 8 /* anisotropy */, true /* depth of field */
|
||||
true /* animatedScenery */, 2 /* animatedCharacters */, 8 /* anisotropy */,
|
||||
true /* depth of field */, true /* global illumination */
|
||||
}
|
||||
};
|
||||
|
||||
@ -362,7 +368,8 @@ void OptionsScreenVideo::updateGfxSlider()
|
||||
GFX_PRESETS[l].shadows == UserConfigParams::m_shadows &&
|
||||
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].dof == UserConfigParams::m_dof &&
|
||||
GFX_PRESETS[l].global_illumination == UserConfigParams::m_gi)
|
||||
{
|
||||
gfx->setValue(l + 1);
|
||||
found = true;
|
||||
@ -444,6 +451,14 @@ void OptionsScreenVideo::updateTooltip()
|
||||
tooltip = tooltip + L"\n" + _("Light shaft (God rays) : %s",
|
||||
UserConfigParams::m_light_shaft ? enabled : disabled);
|
||||
|
||||
//I18N: in graphical options
|
||||
tooltip = tooltip + L"\n" + _("Depth of field : %s",
|
||||
UserConfigParams::m_dof ? enabled : disabled);
|
||||
|
||||
//I18N: in graphical options
|
||||
tooltip = tooltip + L"\n" + _("Global illumination : %s",
|
||||
UserConfigParams::m_gi ? enabled : disabled);
|
||||
|
||||
gfx->setTooltip(tooltip);
|
||||
} // updateTooltip
|
||||
|
||||
@ -526,6 +541,7 @@ void OptionsScreenVideo::eventCallback(Widget* widget, const std::string& name,
|
||||
UserConfigParams::m_ssao = GFX_PRESETS[level].ssao;
|
||||
UserConfigParams::m_weather_effects = GFX_PRESETS[level].weather;
|
||||
UserConfigParams::m_dof = GFX_PRESETS[level].dof;
|
||||
UserConfigParams::m_gi = GFX_PRESETS[level].global_illumination;
|
||||
|
||||
updateGfxSlider();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user