Secbright #22

Merged
alufolie91 merged 2 commits from secbright into Saturn 2023-08-15 17:20:48 +02:00
4 changed files with 12 additions and 4 deletions

No files matched your search

+7 -1
View File
@@ -94,6 +94,11 @@ consvar_t cv_grportals = {"gr_portals", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL,
consvar_t cv_nostencil = {"nostencil", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_portalline = {"portalline", "0", 0, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_portalonly = {"portalonly", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
CV_PossibleValue_t secbright_cons_t[] = {{0, "MIN"}, {255, "MAX"}, {0, NULL}};
consvar_t cv_secbright = {"secbright", "0", CV_SAVE, secbright_cons_t,
NULL, 0, NULL, NULL, 0, 0, NULL};
// values for the far clipping plane
static float clipping_distances[] = {1024.0f, 2048.0f, 4096.0f, 6144.0f, 8192.0f, 12288.0f, 16384.0f};
// values for bsp culling
@@ -441,7 +446,7 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, extracolormap_t *col
}
// Clamp the light level, since it can sometimes go out of the 0-255 range from animations
light_level = min(max(light_level, 0), 255);
light_level = min(max(light_level, cv_secbright.value), 255);
Surface->PolyColor.rgba = poly_color.rgba;
Surface->TintColor.rgba = tint_color.rgba;
@@ -5995,6 +6000,7 @@ void HWR_AddCommands(void)
CV_RegisterVar(&cv_nostencil);
CV_RegisterVar(&cv_portalline);
CV_RegisterVar(&cv_portalonly);
CV_RegisterVar(&cv_secbright);
}
// --------------------------------------------------------------------------
+1
View File
@@ -177,6 +177,7 @@ extern consvar_t cv_grrenderdistance;
extern consvar_t cv_grusecustomshaders;
extern consvar_t cv_grportals;
extern consvar_t cv_nostencil;
extern consvar_t cv_secbright;
extern CV_PossibleValue_t granisotropicmode_cons_t[];
+1 -1
View File
@@ -1405,7 +1405,7 @@ EXPORT void HWRAPI(SetBlend) (FBITFIELD PolyFlags)
// Sryder: Fog
// multiplies input colour by input alpha, and destination colour by input colour, then adds them
pglBlendFunc(GL_SRC_ALPHA, GL_SRC_COLOR);
pglAlphaFunc(GL_NOTEQUAL, 0.0f);
pglAlphaFunc(GL_ALWAYS, 0.0f); // Don't discard zero alpha fragments
break;
default : // must be 0, otherwise it's an error
// No blending
+3 -2
View File
@@ -1688,8 +1688,9 @@ static menuitem_t OP_SaturnMenu[] =
{IT_STRING | IT_CVAR, NULL, "Serverqueue waittime", &cv_connectawaittime, 40},
{IT_STRING | IT_CVAR, NULL, "Addon Download Speed", &cv_downloadspeed, 55},
{IT_STRING | IT_CVAR, NULL, "Less Flicker effects", &cv_lessflicker, 70},
{IT_SUBMENU|IT_STRING, NULL, "Player distortion...", &OP_PlayerDistortDef, 90},
{IT_SUBMENU|IT_STRING, NULL, "Hud Offsets...", &OP_HudOffsetDef, 105},
{IT_STRING | IT_CVAR, NULL, "Min Shader Brightness", &cv_secbright, 80},
{IT_SUBMENU|IT_STRING, NULL, "Player distortion...", &OP_PlayerDistortDef, 100},
{IT_SUBMENU|IT_STRING, NULL, "Hud Offsets...", &OP_HudOffsetDef, 115},
//{IT_SUBMENU|IT_STRING, NULL, "Saturn Credits", &OP_SaturnCreditsDef, 130},
};