2022-09-30 20:36:51 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_SETTINGS_CATEGORIES_SHADOWS_H
|
|
|
|
#define OPENMW_COMPONENTS_SETTINGS_CATEGORIES_SHADOWS_H
|
|
|
|
|
2023-11-01 22:34:54 +00:00
|
|
|
#include <components/settings/sanitizerimpl.hpp>
|
|
|
|
#include <components/settings/settingvalue.hpp>
|
2022-09-30 20:36:51 +00:00
|
|
|
|
|
|
|
#include <osg/Math>
|
|
|
|
#include <osg/Vec2f>
|
|
|
|
#include <osg/Vec3f>
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <string>
|
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
namespace Settings
|
|
|
|
{
|
2023-04-10 15:24:57 +00:00
|
|
|
struct ShadowsCategory : WithIndex
|
2022-09-30 20:36:51 +00:00
|
|
|
{
|
2023-04-10 15:24:57 +00:00
|
|
|
using WithIndex::WithIndex;
|
|
|
|
|
|
|
|
SettingValue<bool> mEnableShadows{ mIndex, "Shadows", "enable shadows" };
|
|
|
|
SettingValue<int> mNumberOfShadowMaps{ mIndex, "Shadows", "number of shadow maps",
|
|
|
|
makeClampSanitizerInt(1, 8) };
|
|
|
|
SettingValue<float> mMaximumShadowMapDistance{ mIndex, "Shadows", "maximum shadow map distance" };
|
|
|
|
SettingValue<float> mShadowFadeStart{ mIndex, "Shadows", "shadow fade start", makeClampSanitizerFloat(0, 1) };
|
|
|
|
SettingValue<float> mSplitPointUniformLogarithmicRatio{ mIndex, "Shadows",
|
|
|
|
"split point uniform logarithmic ratio", makeClampSanitizerFloat(0, 1) };
|
|
|
|
SettingValue<float> mSplitPointBias{ mIndex, "Shadows", "split point bias" };
|
|
|
|
SettingValue<bool> mEnableDebugHud{ mIndex, "Shadows", "enable debug hud" };
|
|
|
|
SettingValue<bool> mEnableDebugOverlay{ mIndex, "Shadows", "enable debug overlay" };
|
|
|
|
SettingValue<std::string> mComputeSceneBounds{ mIndex, "Shadows", "compute scene bounds",
|
2022-09-30 20:36:51 +00:00
|
|
|
makeEnumSanitizerString({ "primitives", "bounds", "none" }) };
|
2023-04-10 15:24:57 +00:00
|
|
|
SettingValue<int> mShadowMapResolution{ mIndex, "Shadows", "shadow map resolution" };
|
|
|
|
SettingValue<float> mMinimumLispsmNearFarRatio{ mIndex, "Shadows", "minimum lispsm near far ratio",
|
2022-09-30 20:36:51 +00:00
|
|
|
makeMaxStrictSanitizerFloat(0) };
|
2023-04-10 15:24:57 +00:00
|
|
|
SettingValue<float> mPolygonOffsetFactor{ mIndex, "Shadows", "polygon offset factor" };
|
|
|
|
SettingValue<float> mPolygonOffsetUnits{ mIndex, "Shadows", "polygon offset units" };
|
|
|
|
SettingValue<float> mNormalOffsetDistance{ mIndex, "Shadows", "normal offset distance" };
|
|
|
|
SettingValue<bool> mUseFrontFaceCulling{ mIndex, "Shadows", "use front face culling" };
|
|
|
|
SettingValue<bool> mActorShadows{ mIndex, "Shadows", "actor shadows" };
|
|
|
|
SettingValue<bool> mPlayerShadows{ mIndex, "Shadows", "player shadows" };
|
|
|
|
SettingValue<bool> mTerrainShadows{ mIndex, "Shadows", "terrain shadows" };
|
|
|
|
SettingValue<bool> mObjectShadows{ mIndex, "Shadows", "object shadows" };
|
|
|
|
SettingValue<bool> mEnableIndoorShadows{ mIndex, "Shadows", "enable indoor shadows" };
|
2022-09-30 20:36:51 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|