Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions src/game/client/neo/ui/neo_root_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ const wchar_t *QUALITY_LABELS[] = {
L"Very High",
};

const wchar_t* QUALITY3_LABELS[] = {
L"Low",
L"High",
L"Very High",
};

enum QualityEnum
{
QUALITY_LOW = 0,
Expand All @@ -40,6 +46,13 @@ enum QualityEnum
QUALITY_VERYHIGH,
};

enum Quality3Enum
{
QUALITY3_LOW = 0,
QUALITY3_HIGH,
QUALITY3_VERYHIGH,
};

enum ESpeaker
{
SPEAKER_AUTO = -1,
Expand Down Expand Up @@ -348,7 +361,15 @@ void NeoSettingsRestore(NeoSettings *ns, const NeoSettings::Keys::Flags flagsKey
pVideo->iCoreRendering = (queueMode == -1 || queueMode == 2) ? THREAD_MULTI : THREAD_SINGLE;
pVideo->iModelDetail = 2 - cvr->r_rootlod.GetInt(); // Inverse, highest = 0, lowest = 2
pVideo->iTextureDetail = 3 - (cvr->mat_picmip.GetInt() + 1); // Inverse+1, highest = -1, lowest = 2
pVideo->iShaderDetail = 1 - cvr->mat_reducefillrate.GetInt(); // Inverse, 1 = low, 0 = high
// Shader detail
// mat_reducefillrate r_lightmap_bicubic
// Low: 1 0
// High: 0 0
// Very High: 0 1
pVideo->iShaderDetail = (cvr->r_lightmap_bicubic.GetBool()) ? QUALITY3_VERYHIGH :
(cvr->mat_reducefillrate.GetBool()) ? QUALITY3_LOW :
QUALITY3_HIGH;

// Water detail
// r_waterforceexpensive r_waterforcereflectentities
// Simple: 0 0
Expand Down Expand Up @@ -568,7 +589,8 @@ void NeoSettingsSave(const NeoSettings *ns)
cvr->mat_queue_mode.SetValue((pVideo->iCoreRendering == THREAD_MULTI) ? 2 : 0);
cvr->r_rootlod.SetValue(2 - pVideo->iModelDetail);
cvr->mat_picmip.SetValue(2 - pVideo->iTextureDetail);
cvr->mat_reducefillrate.SetValue(1 - pVideo->iShaderDetail);
cvr->mat_reducefillrate.SetValue(pVideo->iShaderDetail == QUALITY3_LOW);
cvr->r_lightmap_bicubic.SetValue(pVideo->iShaderDetail == QUALITY3_VERYHIGH);
cvr->r_waterforceexpensive.SetValue(pVideo->iWaterDetail >= QUALITY_MEDIUM);
cvr->r_waterforcereflectentities.SetValue(pVideo->iWaterDetail == QUALITY_HIGH);
cvr->r_shadowrendertotexture.SetValue(pVideo->iShadowDetail >= QUALITY_MEDIUM);
Expand Down Expand Up @@ -823,7 +845,7 @@ void NeoSettings_Audio(NeoSettings *ns)

static const wchar_t *WINDOW_MODE[WINDOWMODE__TOTAL] = { L"Fullscreen", L"Windowed", L"Windowed (Borderless)" };
static const wchar_t *QUEUE_MODE[] = { L"Single", L"Multi", };
static const wchar_t *QUALITY2_LABELS[] = { L"Low", L"High", };
static const wchar_t *QUALITY2_LABELS[] = { L"Low", L"High" };
static const wchar_t *FILTERING_LABELS[FILTERING__TOTAL] = {
L"Bilinear", L"Trilinear", L"Anisotropic 2X", L"Anisotropic 4X", L"Anisotropic 8X", L"Anisotropic 16X",
};
Expand All @@ -839,7 +861,7 @@ void NeoSettings_Video(NeoSettings *ns)
NeoUI::RingBox(L"Core Rendering", QUEUE_MODE, ARRAYSIZE(QUEUE_MODE), &pVideo->iCoreRendering);
NeoUI::RingBox(L"Model detail", QUALITY_LABELS, 3, &pVideo->iModelDetail);
NeoUI::RingBox(L"Texture detail", QUALITY_LABELS, 4, &pVideo->iTextureDetail);
NeoUI::RingBox(L"Shader detail", QUALITY2_LABELS, 2, &pVideo->iShaderDetail);
NeoUI::RingBox(L"Shader detail", QUALITY3_LABELS, 3, &pVideo->iShaderDetail);
NeoUI::RingBox(L"Water detail", WATER_LABELS, ARRAYSIZE(WATER_LABELS), &pVideo->iWaterDetail);
NeoUI::RingBox(L"Shadow detail", QUALITY_LABELS, 3, &pVideo->iShadowDetail);
NeoUI::RingBoxBool(L"Color correction", &pVideo->bColorCorrection);
Expand Down
1 change: 1 addition & 0 deletions src/game/client/neo/ui/neo_root_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ struct NeoSettings
CONVARREF_DEF(r_rootlod);
CONVARREF_DEF(mat_picmip);
CONVARREF_DEF(mat_reducefillrate);
CONVARREF_DEF(r_lightmap_bicubic);
CONVARREF_DEF(r_waterforceexpensive);
CONVARREF_DEF(r_waterforcereflectentities);
CONVARREF_DEF(r_flashlightdepthtexture);
Expand Down