- For hardware 2D, apply fixed colormaps when copying to video memory instead
of doing it directly during the rendering, in order to improve visual fidelity for colormaps that aren't grayscale. SVN r1866 (trunk)
This commit is contained in:
parent
84a018f05a
commit
d502655866
6 changed files with 37 additions and 8 deletions
|
|
@ -140,6 +140,7 @@ int validcount = 1; // increment every time a check is made
|
|||
FDynamicColormap*basecolormap; // [RH] colormap currently drawing with
|
||||
int fixedlightlev;
|
||||
lighttable_t *fixedcolormap;
|
||||
FSpecialColormap *realfixedcolormap;
|
||||
float WallTMapScale;
|
||||
float WallTMapScale2;
|
||||
|
||||
|
|
@ -1158,6 +1159,7 @@ void R_SetupFrame (AActor *actor)
|
|||
}
|
||||
}
|
||||
|
||||
realfixedcolormap = NULL;
|
||||
fixedcolormap = NULL;
|
||||
fixedlightlev = -1;
|
||||
|
||||
|
|
@ -1165,7 +1167,18 @@ void R_SetupFrame (AActor *actor)
|
|||
{
|
||||
if (player->fixedcolormap >= 0 && player->fixedcolormap < (int)SpecialColormaps.Size())
|
||||
{
|
||||
fixedcolormap = SpecialColormaps[player->fixedcolormap].Colormap;
|
||||
realfixedcolormap = &SpecialColormaps[player->fixedcolormap];
|
||||
if (RenderTarget == screen && (DFrameBuffer *)screen->Accel2D)
|
||||
{
|
||||
// Render everything fullbright. The copy to video memory will
|
||||
// apply the special colormap, so it won't be restricted to the
|
||||
// palette.
|
||||
fixedcolormap = realcolormaps;
|
||||
}
|
||||
else
|
||||
{
|
||||
fixedcolormap = SpecialColormaps[player->fixedcolormap].Colormap;
|
||||
}
|
||||
}
|
||||
else if (player->fixedlightlevel >= 0 && player->fixedlightlevel < NUMCOLORMAPS)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue