OpenGL2: Remove map color scaling and r_forceSunMapLightScale.
Also simplify overbright code in ComputeShaderColors().
This commit is contained in:
parent
4c169ab574
commit
4faf1008a0
11 changed files with 32 additions and 100 deletions
|
@ -105,11 +105,7 @@ static void R_ColorShiftLightingBytes( byte in[4], byte out[4] ) {
|
|||
int shift, r, g, b;
|
||||
|
||||
// shift the color data based on overbright range
|
||||
#if defined(USE_OVERBRIGHT)
|
||||
shift = r_mapOverBrightBits->integer - tr.overbrightBits;
|
||||
#else
|
||||
shift = 0;
|
||||
#endif
|
||||
|
||||
// shift the data based on overbright range
|
||||
r = in[0] << shift;
|
||||
|
@ -144,9 +140,7 @@ static void R_ColorShiftLightingFloats(float in[4], float out[4], float scale )
|
|||
{
|
||||
float r, g, b;
|
||||
|
||||
#if defined(USE_OVERBRIGHT)
|
||||
scale *= 1 << (r_mapOverBrightBits->integer - tr.overbrightBits);
|
||||
#endif
|
||||
|
||||
r = in[0] * scale;
|
||||
g = in[1] * scale;
|
||||
|
@ -2686,11 +2680,7 @@ void R_LoadLightGrid( lump_t *l ) {
|
|||
|
||||
if (hdrLightGrid)
|
||||
{
|
||||
#if defined(USE_OVERBRIGHT)
|
||||
float lightScale = 1 << (r_mapOverBrightBits->integer - tr.overbrightBits);
|
||||
#else
|
||||
float lightScale = 1.0f;
|
||||
#endif
|
||||
|
||||
//ri.Printf(PRINT_ALL, "found!\n");
|
||||
|
||||
|
@ -3165,7 +3155,6 @@ void RE_LoadWorldMap( const char *name ) {
|
|||
}
|
||||
|
||||
// set default map light scale
|
||||
tr.mapLightScale = 1.0f;
|
||||
tr.sunShadowScale = 0.5f;
|
||||
|
||||
// set default sun direction to be used if it isn't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue