mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-22 12:22:12 +00:00
Added UI options for Cascaded Shadow Maps
This commit is contained in:
parent
eca97b3dd3
commit
4b89353f50
3 changed files with 56 additions and 10 deletions
|
@ -1,3 +1,4 @@
|
|||
- Added UI options for Cascaded Shadow Maps
|
||||
- Changed com_zoneMegs to 128 (from 64)
|
||||
- Adjust default auto-exposure a bit higher.
|
||||
- Added .mtr file support. .mtr files are just .shader files that are accessed first.
|
||||
|
|
|
@ -5686,6 +5686,7 @@ static void UI_Update(const char *name)
|
|||
|
||||
trap_Cvar_SetValue("ui_filteringMode", 1);
|
||||
trap_Cvar_SetValue("ui_shaderLevel", 1);
|
||||
trap_Cvar_SetValue("ui_shadowMaps", 2);
|
||||
break;
|
||||
case 2: // crappiest
|
||||
trap_Cvar_SetValue("cg_brassTime", 0);
|
||||
|
@ -5709,6 +5710,7 @@ static void UI_Update(const char *name)
|
|||
|
||||
trap_Cvar_SetValue("ui_filteringMode", 0);
|
||||
trap_Cvar_SetValue("ui_shaderLevel", 0);
|
||||
trap_Cvar_SetValue("ui_shadowMaps", 0);
|
||||
break;
|
||||
case 3: // crap
|
||||
trap_Cvar_SetValue("cg_brassTime", 7500);
|
||||
|
@ -5732,6 +5734,7 @@ static void UI_Update(const char *name)
|
|||
|
||||
trap_Cvar_SetValue("ui_filteringMode", 1);
|
||||
trap_Cvar_SetValue("ui_shaderLevel", 0);
|
||||
trap_Cvar_SetValue("ui_shadowMaps", 1);
|
||||
break;
|
||||
case 4: // high quality
|
||||
trap_Cvar_SetValue("cg_brassTime", 20000);
|
||||
|
@ -5755,6 +5758,7 @@ static void UI_Update(const char *name)
|
|||
|
||||
trap_Cvar_SetValue("ui_filteringMode", 4);
|
||||
trap_Cvar_SetValue("ui_shaderLevel", 1);
|
||||
trap_Cvar_SetValue("ui_shadowMaps", 2);
|
||||
break;
|
||||
case 5: // highest quality
|
||||
trap_Cvar_SetValue("cg_brassTime", 20000);
|
||||
|
@ -5778,6 +5782,7 @@ static void UI_Update(const char *name)
|
|||
|
||||
trap_Cvar_SetValue("ui_filteringMode", 5);
|
||||
trap_Cvar_SetValue("ui_shaderLevel", 1);
|
||||
trap_Cvar_SetValue("ui_shadowMaps", 3);
|
||||
break;
|
||||
}
|
||||
} else if (Q_stricmp(name, "ui_filteringMode") == 0) {
|
||||
|
@ -5826,6 +5831,30 @@ static void UI_Update(const char *name)
|
|||
trap_Cvar_SetValue("r_specularMapping", 1);
|
||||
break;
|
||||
}
|
||||
} else if (Q_stricmp(name, "ui_shadowMaps") == 0) {
|
||||
switch (val) {
|
||||
// cascaded shadow maps
|
||||
case 0: // disabled
|
||||
trap_Cvar_SetValue("r_sunShadows", 0);
|
||||
trap_Cvar_SetValue("r_shadowFilter", 0);
|
||||
trap_Cvar_SetValue("r_shadowMapSize", 0);
|
||||
break;
|
||||
case 1: // low
|
||||
trap_Cvar_SetValue("r_sunShadows", 1);
|
||||
trap_Cvar_SetValue("r_shadowFilter", 1);
|
||||
trap_Cvar_SetValue("r_shadowMapSize", 512);
|
||||
break;
|
||||
case 2: // medium
|
||||
trap_Cvar_SetValue("r_sunShadows", 1);
|
||||
trap_Cvar_SetValue("r_shadowFilter", 2);
|
||||
trap_Cvar_SetValue("r_shadowMapSize", 1024);
|
||||
break;
|
||||
case 3: // high
|
||||
trap_Cvar_SetValue("r_sunShadows", 1);
|
||||
trap_Cvar_SetValue("r_shadowFilter", 2);
|
||||
trap_Cvar_SetValue("r_shadowMapSize", 2048);
|
||||
break;
|
||||
}
|
||||
} else if (Q_stricmp(name, "ui_mousePitch") == 0) {
|
||||
if (val == 0) {
|
||||
trap_Cvar_SetValue("m_pitch", 0.022f);
|
||||
|
|
|
@ -276,7 +276,23 @@ Group # 1 - Graphics
|
|||
action { uiScript glCustom ; uiScript update "ui_shaderLevel" }
|
||||
ASSIGN_HINT("hint_shader")
|
||||
END_OPTION
|
||||
ADD_HINT("hint_shader", "Use per-pixel lighting to improve render quality", "group1")
|
||||
ADD_HINT("hint_shader", "Enable normal mapping and specular reflectivity", "group1")
|
||||
|
||||
|
||||
// Cascaded Shadow Maps //
|
||||
|
||||
BEGIN_OPTION("Cascaded Shadow Maps", "ui_shadowMaps", ITEM_TYPE_MULTI, 7, 1)
|
||||
cvarFloatList {
|
||||
"Off" 0
|
||||
"Low" 1
|
||||
"Medium" 2
|
||||
"High" 3
|
||||
}
|
||||
OPTION_BELOW("gr1_ctrl6")
|
||||
action { uiScript glCustom ; uiScript update "ui_shadowMaps" }
|
||||
ASSIGN_HINT("hint_csm")
|
||||
END_OPTION
|
||||
ADD_HINT("hint_csm", "Enable sunlight and cascaded shadow maps", "group1")
|
||||
|
||||
|
||||
// Lightmap/vertex //
|
||||
|
@ -294,13 +310,13 @@ Group # 1 - Graphics
|
|||
|
||||
// Geometric detail //
|
||||
|
||||
BEGIN_OPTION("Geometric Detail", "r_lodbias", ITEM_TYPE_MULTI, 7, 1)
|
||||
BEGIN_OPTION("Geometric Detail", "r_lodbias", ITEM_TYPE_MULTI, 8, 1)
|
||||
cvarFloatList {
|
||||
"High" 0
|
||||
"Medium" 1
|
||||
"Low" 2
|
||||
"Medium" 1
|
||||
"High" 0
|
||||
}
|
||||
OPTION_BELOW("gr1_ctrl6")
|
||||
OPTION_BELOW("gr1_ctrl7")
|
||||
action { uiScript glCustom ; uiScript update "r_lodbias" }
|
||||
ASSIGN_HINT("hint_geodetail")
|
||||
END_OPTION
|
||||
|
@ -309,14 +325,14 @@ Group # 1 - Graphics
|
|||
|
||||
// Texture detail //
|
||||
|
||||
BEGIN_OPTION("Texture Detail", "r_picmip", ITEM_TYPE_MULTI, 8, 1)
|
||||
BEGIN_OPTION("Texture Detail", "r_picmip", ITEM_TYPE_MULTI, 9, 1)
|
||||
cvarFloatList {
|
||||
"Very Low" 3
|
||||
"Low" 2
|
||||
"Medium" 1
|
||||
"High" 0
|
||||
}
|
||||
OPTION_BELOW("gr1_ctrl7")
|
||||
OPTION_BELOW("gr1_ctrl8")
|
||||
action { uiScript glCustom ; }
|
||||
ASSIGN_HINT("hint_texdetail")
|
||||
END_OPTION
|
||||
|
@ -340,8 +356,8 @@ Group # 1 - Graphics
|
|||
|
||||
// Compressed textures //
|
||||
|
||||
BEGIN_OPTION("Compress Textures", "r_ext_compressed_textures", ITEM_TYPE_YESNO, 9, 1)
|
||||
OPTION_BELOW("gr1_ctrl8")
|
||||
BEGIN_OPTION("Compress Textures", "r_ext_compressed_textures", ITEM_TYPE_YESNO, 10, 1)
|
||||
OPTION_BELOW("gr1_ctrl9")
|
||||
action { uiScript glCustom ; }
|
||||
ASSIGN_HINT("hint_compress")
|
||||
END_OPTION
|
||||
|
@ -353,7 +369,7 @@ Group # 1 - Graphics
|
|||
itemdef {
|
||||
name "btn_apply,fade_alpha,allgroups,group1"
|
||||
style WINDOW_STYLE_EMPTY
|
||||
alignrect "gr1_ctrl9" ITEM_ALIGN_RIGHT 0 24 80 VSIZE
|
||||
alignrect "gr1_ctrl10" ITEM_ALIGN_RIGHT 0 24 80 VSIZE
|
||||
type ITEM_TYPE_BUTTON
|
||||
text "^_A^_pply >"
|
||||
shortcutKey "A"
|
||||
|
|
Loading…
Reference in a new issue