presets and postprocessing update

This commit is contained in:
pierow 2024-02-29 01:33:35 -05:00
parent dcb4de963d
commit 0bdc52796f
7 changed files with 33 additions and 27 deletions

View file

@ -2,7 +2,8 @@
brightness "1" brightness "1"
gamma "2.5" gamma "2.5"
lightgamma "2.5" lightgamma "2.5"
cl_shader "1" cl_postprocess "1"
cl_intensity "1"
// Bobbing // Bobbing
cl_bob "0.01" cl_bob "0.01"

View file

@ -2,7 +2,8 @@
brightness "0" brightness "0"
gamma "2.5" gamma "2.5"
lightgamma "1.81" lightgamma "1.81"
cl_shader "1" cl_postprocess "1"
cl_intensity "1"
// Bobbing // Bobbing
cl_bob "0.006" cl_bob "0.006"

View file

@ -2,7 +2,8 @@
brightness "2" brightness "2"
gamma "3" gamma "3"
lightgamma "2" lightgamma "2"
cl_shader "0" cl_postprocess "0"
cl_intensity "0"
// No bobbing // No bobbing
cl_bob "0" cl_bob "0"

View file

@ -9,7 +9,6 @@ uniform float colorMultiplier; // Uniform float to multiply color by
void main() { void main() {
// Sample the texture // Sample the texture
vec4 texColor = texture(textureSampler, texCoord); vec4 texColor = texture(textureSampler, texCoord);
// Multiply the color
// Multiply the color by the uniform float fragColor = vec4(texColor.rgb * colorMultiplier, 1.0f);
fragColor = texColor * colorMultiplier;
} }

View file

@ -1548,8 +1548,9 @@ void NsPreset(void)
{ {
// Localize later. // Localize later.
//sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset1")); //sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset1"));
snprintf(execText, 1024, "%c** %s\n", HUD_PRINTTALK, "Classic NS audio/visual presets applied. See console for details."); snprintf(execText, 1024, "%c** %s\n", HUD_PRINTTALK, "Classic NS audio/visual presets applied. Left click once to fix bug. See console for details.");
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(execText) + 1, execText); gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(execText) + 1, execText);
ClientCmd("echo \"NOTE: Left click once after applying these settings, or your next left click won't register. It's an HL engine bug.\""); // Use echo or it's out of order.
} }
else else
{ {
@ -1563,8 +1564,9 @@ void NsPreset(void)
{ {
// Localize later. // Localize later.
//sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset2")); //sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset2"));
snprintf(execText, 1024, "%c** %s\n", HUD_PRINTTALK, "NS 3.3 audio/visual presets applied. See console for details."); snprintf(execText, 1024, "%c** %s\n", HUD_PRINTTALK, "NS 3.3 audio/visual presets applied. Left click once to fix bug. See console for details. ");
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(execText) + 1, execText); gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(execText) + 1, execText);
ClientCmd("echo \"NOTE: Left click once after applying these settings, or your next left click won't register. It's an HL engine bug.\""); // Use echo or it's out of order.
} }
else else
{ {
@ -1578,8 +1580,9 @@ void NsPreset(void)
{ {
// Localize later. // Localize later.
//sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset3")); //sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset3"));
snprintf(execText, 1024, "%c** %s\n", HUD_PRINTTALK, "Competive audio/visual presets applied. See console for details."); snprintf(execText, 1024, "%c** %s\n", HUD_PRINTTALK, "Competive audio/visual presets applied. Left click once to fix bug. See console for details.");
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(execText) + 1, execText); gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(execText) + 1, execText);
ClientCmd("echo \"NOTE: Left click once after applying these settings, or your next left click won't register. It's an HL engine bug.\""); // Use echo or it's out of order.
} }
else else
{ {

View file

@ -4929,10 +4929,11 @@ void AvHHud::InitExploitPrevention() {
ForceCvar("r_detailtextures", r_detailtextures, 0.0f); ForceCvar("r_detailtextures", r_detailtextures, 0.0f);
ForceCvar("gl_max_size", gl_max_size, 512.0f); ForceCvar("gl_max_size", gl_max_size, 512.0f);
//2024 - Lighting changes: lower min lightgamma to engine limit. Engine crashes below 1.81, so enforce the limit.
//RemoveAlias("lightgamma"); //RemoveAlias("lightgamma");
//if(lightgamma && lightgamma->value < 2.0) { if(lightgamma && lightgamma->value < 1.81f) {
// ForceCvar("lightgamma", lightgamma, 2.0f); ForceCvar("lightgamma", lightgamma, 1.81f);
//} }
//if(lightgamma && lightgamma->value > 5.0) { //if(lightgamma && lightgamma->value > 5.0) {
// ForceCvar("lightgamma", lightgamma, 5.0f); // ForceCvar("lightgamma", lightgamma, 5.0f);
//} //}
@ -4964,9 +4965,9 @@ void AvHHud::UpdateExploitPrevention()
if(lightgamma && lightgamma->value < 1.81f) { if(lightgamma && lightgamma->value < 1.81f) {
ForceCvar("lightgamma", lightgamma, 1.81f); ForceCvar("lightgamma", lightgamma, 1.81f);
} }
if(lightgamma && lightgamma->value > 5.0) { //if(lightgamma && lightgamma->value > 5.0) {
ForceCvar("lightgamma", lightgamma, 5.0f); // ForceCvar("lightgamma", lightgamma, 5.0f);
} //}
if(texgamma && texgamma->value < 1.0) { if(texgamma && texgamma->value < 1.0) {
ForceCvar("texgamma", texgamma, 1.0f); ForceCvar("texgamma", texgamma, 1.0f);
} }

View file

@ -2876,11 +2876,11 @@ void AvHHud::RenderShowSpeed()
float theGroundSpeed = sqrtf(pmove->velocity[0] * pmove->velocity[0] + pmove->velocity[1] * pmove->velocity[1]); float theGroundSpeed = sqrtf(pmove->velocity[0] * pmove->velocity[0] + pmove->velocity[1] * pmove->velocity[1]);
maxGroundSpeed = max(theGroundSpeed, maxGroundSpeed); maxGroundSpeed = max(theGroundSpeed, maxGroundSpeed);
//sprintf(buffer, "Ground speed = %d (%d)", (int)theGroundSpeed, maxGroundSpeed); sprintf(buffer, "Ground speed = %d (%d)", (int)theGroundSpeed, maxGroundSpeed);
//mFont.DrawString(10, 12 + mFont.GetStringHeight(), buffer, theR, theG, theB); mFont.DrawString(10, 12 + mFont.GetStringHeight(), buffer, theR, theG, theB);
sprintf(buffer, "vangle0= %f vangle1= %f vangle2= %f)", pmove->angles[0], pmove->angles[1], pmove->angles[2]); //sprintf(buffer, "vangle0= %f vangle1= %f vangle2= %f)", pmove->angles[0], pmove->angles[1], pmove->angles[2]);
mFont.DrawString(10, 12 + mFont.GetStringHeight() * 2, buffer, theR, theG, theB); //mFont.DrawString(10, 12 + mFont.GetStringHeight() * 2, buffer, theR, theG, theB);
speedMeasured = true; speedMeasured = true;
} }
else if (speedMeasured == true) { else if (speedMeasured == true) {