mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Implement r_modulate in the software renderer.
This is the same implementation as in GL1. In fact the code was basically there, only the cvar itself was missing. Maybe for performance reasons?
This commit is contained in:
parent
e01e9a0b94
commit
3df860983f
3 changed files with 5 additions and 4 deletions
|
@ -477,10 +477,9 @@ extern cvar_t *r_drawentities;
|
|||
extern cvar_t *r_drawworld;
|
||||
extern cvar_t *r_dspeeds;
|
||||
extern cvar_t *r_lerpmodels;
|
||||
|
||||
extern cvar_t *r_speeds;
|
||||
|
||||
extern cvar_t *r_lightlevel; //FIXME HACK
|
||||
extern cvar_t *r_lightlevel;
|
||||
extern cvar_t *r_modulate;
|
||||
|
||||
extern cvar_t *vid_fullscreen;
|
||||
extern cvar_t *vid_gamma;
|
||||
|
|
|
@ -201,7 +201,7 @@ int RecursiveLightPoint (mnode_t *node, vec3_t start, vec3_t end)
|
|||
for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ;
|
||||
maps++)
|
||||
{
|
||||
samp = *lightmap * /* 0.5 * */ (1.0/255); // adjust for gl scale
|
||||
samp = *lightmap * r_modulate->value * (1.0/255); // adjust for gl scale
|
||||
scales = r_newrefdef.lightstyles[surf->styles[maps]].rgb;
|
||||
VectorMA (pointcolor, samp, scales, pointcolor);
|
||||
lightmap += ((surf->extents[0]>>4)+1) *
|
||||
|
|
|
@ -145,6 +145,7 @@ cvar_t *r_dspeeds;
|
|||
cvar_t *r_fullbright;
|
||||
cvar_t *r_lerpmodels;
|
||||
cvar_t *r_novis;
|
||||
cvar_t *r_modulate;
|
||||
|
||||
cvar_t *r_speeds;
|
||||
cvar_t *r_lightlevel; //FIXME HACK
|
||||
|
@ -284,6 +285,7 @@ void R_Register (void)
|
|||
r_lightlevel = ri.Cvar_Get ("r_lightlevel", "0", 0);
|
||||
r_lerpmodels = ri.Cvar_Get( "r_lerpmodels", "1", 0 );
|
||||
r_novis = ri.Cvar_Get( "r_novis", "0", 0 );
|
||||
r_modulate = ri.Cvar_Get("r_modulate", "1", CVAR_ARCHIVE);
|
||||
|
||||
vid_fullscreen = ri.Cvar_Get( "vid_fullscreen", "0", CVAR_ARCHIVE );
|
||||
vid_gamma = ri.Cvar_Get( "vid_gamma", "1.0", CVAR_ARCHIVE );
|
||||
|
|
Loading…
Reference in a new issue