mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-25 04:00:47 +00:00
Don't apply color cube in md2_loadTexture when in palette rendering mode
Fixes brightness getting applied twice on models in palette rendering mode
This commit is contained in:
parent
bbf23a5143
commit
6c4cb3a025
1 changed files with 12 additions and 8 deletions
|
@ -387,8 +387,6 @@ static void md2_loadTexture(md2_t *model)
|
|||
if (!grPatch->mipmap->downloaded && !grPatch->mipmap->data)
|
||||
{
|
||||
int w = 0, h = 0;
|
||||
UINT32 size;
|
||||
RGBA_t *image;
|
||||
|
||||
#ifdef HAVE_PNG
|
||||
grPatch->mipmap->format = PNG_Load(filename, &w, &h, grPatch);
|
||||
|
@ -409,6 +407,11 @@ static void md2_loadTexture(md2_t *model)
|
|||
grPatch->mipmap->width = (UINT16)w;
|
||||
grPatch->mipmap->height = (UINT16)h;
|
||||
|
||||
// for palette rendering, color cube is applied in post-processing instead of here
|
||||
if (!HWR_ShouldUsePaletteRendering())
|
||||
{
|
||||
UINT32 size;
|
||||
RGBA_t *image;
|
||||
// Lactozilla: Apply colour cube
|
||||
image = grPatch->mipmap->data;
|
||||
size = w*h;
|
||||
|
@ -418,6 +421,7 @@ static void md2_loadTexture(md2_t *model)
|
|||
image++;
|
||||
}
|
||||
}
|
||||
}
|
||||
HWD.pfnSetTexture(grPatch->mipmap);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue