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"
gamma "2.5"
lightgamma "2.5"
cl_shader "1"
cl_postprocess "1"
cl_intensity "1"
// Bobbing
cl_bob "0.01"

View File

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

View File

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

View File

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

View File

@ -1547,9 +1547,10 @@ void NsPreset(void)
if (printToChat)
{
// Localize later.
//sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset1"));
snprintf(execText, 1024, "%c** %s\n", HUD_PRINTTALK, "Classic NS audio/visual presets applied. See console for details.");
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(execText) + 1, execText);
//sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset1"));
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);
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
{
@ -1562,9 +1563,10 @@ void NsPreset(void)
if (printToChat)
{
// Localize later.
//sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset2"));
snprintf(execText, 1024, "%c** %s\n", HUD_PRINTTALK, "NS 3.3 audio/visual presets applied. See console for details.");
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(execText) + 1, execText);
//sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset2"));
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);
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
{
@ -1577,9 +1579,10 @@ void NsPreset(void)
if (printToChat)
{
// Localize later.
//sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset3"));
snprintf(execText, 1024, "%c** %s\n", HUD_PRINTTALK, "Competive audio/visual presets applied. See console for details.");
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(execText) + 1, execText);
//sprintf(localizedText, CHudTextMessage::BufferedLocaliseTextString("#Preset3"));
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);
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
{

View File

@ -4929,10 +4929,11 @@ void AvHHud::InitExploitPrevention() {
ForceCvar("r_detailtextures", r_detailtextures, 0.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");
//if(lightgamma && lightgamma->value < 2.0) {
// ForceCvar("lightgamma", lightgamma, 2.0f);
//}
if(lightgamma && lightgamma->value < 1.81f) {
ForceCvar("lightgamma", lightgamma, 1.81f);
}
//if(lightgamma && lightgamma->value > 5.0) {
// ForceCvar("lightgamma", lightgamma, 5.0f);
//}
@ -4964,9 +4965,9 @@ void AvHHud::UpdateExploitPrevention()
if(lightgamma && lightgamma->value < 1.81f) {
ForceCvar("lightgamma", lightgamma, 1.81f);
}
if(lightgamma && lightgamma->value > 5.0) {
ForceCvar("lightgamma", lightgamma, 5.0f);
}
//if(lightgamma && lightgamma->value > 5.0) {
// ForceCvar("lightgamma", lightgamma, 5.0f);
//}
if(texgamma && texgamma->value < 1.0) {
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]);
maxGroundSpeed = max(theGroundSpeed, maxGroundSpeed);
//sprintf(buffer, "Ground speed = %d (%d)", (int)theGroundSpeed, maxGroundSpeed);
//mFont.DrawString(10, 12 + mFont.GetStringHeight(), buffer, theR, theG, theB);
sprintf(buffer, "Ground speed = %d (%d)", (int)theGroundSpeed, maxGroundSpeed);
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]);
mFont.DrawString(10, 12 + mFont.GetStringHeight() * 2, buffer, theR, theG, theB);
//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);
speedMeasured = true;
}
else if (speedMeasured == true) {