mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-30 00:10:53 +00:00
soft: preshift values in lightmap
This commit is contained in:
parent
020ce27109
commit
e650eff100
2 changed files with 8 additions and 5 deletions
|
@ -363,10 +363,13 @@ R_ApplyLight(pixel_t pix, const light3_t light)
|
|||
b_g = vid_lightmap[light_masked[1] + b_g];
|
||||
b_b = vid_lightmap[light_masked[2] + b_b];
|
||||
|
||||
/* convert back to indexed color */
|
||||
b_r = ( b_r >> 3 ) & 31;
|
||||
b_g = ( b_g >> 2 ) & 63;
|
||||
b_b = ( b_b >> 3 ) & 31;
|
||||
/*
|
||||
* convert back to indexed color (value reshifted >> 2)
|
||||
* look to R_Convert32To8bit
|
||||
*/
|
||||
b_r = ( b_r >> 1 ); // & 31;
|
||||
b_g = ( b_g >> 0 ); // & 63;
|
||||
b_b = ( b_b >> 1 ); // & 31;
|
||||
|
||||
i_c = b_r | ( b_g << 5 ) | ( b_b << 11 );
|
||||
|
||||
|
|
|
@ -1811,7 +1811,7 @@ Draw_GetPalette (void)
|
|||
vid_lightthreshold = i * 256;
|
||||
|
||||
for(j=0; j < 256; j++)
|
||||
vid_lightmap[i * 256 + j] = (j * scale) / 255;
|
||||
vid_lightmap[i * 256 + j] = ((j * scale / 255) >> 2) & 63;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue