- Implementing RGB666 colormatching to replace less precise RGB555 in some parts of the code.
This commit is contained in:
parent
f6b0f2648c
commit
821b10a254
18 changed files with 368 additions and 627 deletions
|
|
@ -238,22 +238,16 @@ namespace swrenderer
|
|||
}
|
||||
if (flags & STYLEF_InvertSource)
|
||||
{
|
||||
dc_srcblend = Col2RGB8_Inverse[fglevel >> 10];
|
||||
dc_destblend = Col2RGB8_LessPrecision[bglevel >> 10];
|
||||
dc_srcalpha = fglevel;
|
||||
dc_destalpha = bglevel;
|
||||
}
|
||||
else if (op == STYLEOP_Add && fglevel + bglevel <= FRACUNIT)
|
||||
{
|
||||
dc_srcblend = Col2RGB8[fglevel >> 10];
|
||||
dc_destblend = Col2RGB8[bglevel >> 10];
|
||||
dc_srcalpha = fglevel;
|
||||
dc_destalpha = bglevel;
|
||||
}
|
||||
else
|
||||
{
|
||||
dc_srcblend = Col2RGB8_LessPrecision[fglevel >> 10];
|
||||
dc_destblend = Col2RGB8_LessPrecision[bglevel >> 10];
|
||||
dc_srcalpha = fglevel;
|
||||
dc_destalpha = bglevel;
|
||||
}
|
||||
|
|
@ -450,7 +444,7 @@ namespace swrenderer
|
|||
uint32_t g = GPART(color);
|
||||
uint32_t b = BPART(color);
|
||||
// dc_color is used by the rt_* routines. It is indexed into dc_srcblend.
|
||||
dc_color = RGB32k.RGB[r >> 3][g >> 3][b >> 3];
|
||||
dc_color = RGB256k.RGB[r >> 2][g >> 2][b >> 2];
|
||||
if (style.Flags & STYLEF_InvertSource)
|
||||
{
|
||||
r = 255 - r;
|
||||
|
|
@ -1362,8 +1356,4 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
void R_DrawParticle(vissprite_t *sprite)
|
||||
{
|
||||
R_DrawParticle_C(sprite);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue