mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- fixed voxel rendering.
This commit is contained in:
parent
a7dd547dc1
commit
2ee18b3a11
1 changed files with 5 additions and 1 deletions
|
@ -314,6 +314,10 @@ int tileSetSkybox(int picnum, int palnum, const char **facenames, int flags )
|
||||||
static bool PickTexture(FGameTexture* tex, int paletteid, TexturePick& pick)
|
static bool PickTexture(FGameTexture* tex, int paletteid, TexturePick& pick)
|
||||||
{
|
{
|
||||||
if (!tex->isValid() || tex->GetTexelWidth() <= 0 || tex->GetTexelHeight() <= 0) return false;
|
if (!tex->isValid() || tex->GetTexelWidth() <= 0 || tex->GetTexelHeight() <= 0) return false;
|
||||||
|
if (paletteid == 0)
|
||||||
|
{
|
||||||
|
int a = 0;
|
||||||
|
}
|
||||||
int usepalette = paletteid == 0? 0 : GetTranslationType(paletteid) - Translation_Remap;
|
int usepalette = paletteid == 0? 0 : GetTranslationType(paletteid) - Translation_Remap;
|
||||||
int usepalswap = GetTranslationIndex(paletteid);
|
int usepalswap = GetTranslationIndex(paletteid);
|
||||||
int TextureType = hw_int_useindexedcolortextures? TT_INDEXED : TT_TRUECOLOR;
|
int TextureType = hw_int_useindexedcolortextures? TT_INDEXED : TT_TRUECOLOR;
|
||||||
|
@ -353,7 +357,7 @@ static bool PickTexture(FGameTexture* tex, int paletteid, TexturePick& pick)
|
||||||
applytint = true;
|
applytint = true;
|
||||||
if (!(h.tintFlags & TINTF_APPLYOVERPALSWAP)) usepalswap = 0;
|
if (!(h.tintFlags & TINTF_APPLYOVERPALSWAP)) usepalswap = 0;
|
||||||
}
|
}
|
||||||
pick.translation = TRANSLATION(usepalette + Translation_Remap, usepalswap);
|
pick.translation = paletteid == 0? 0 : TRANSLATION(usepalette + Translation_Remap, usepalswap);
|
||||||
}
|
}
|
||||||
else pick.translation |= 0x80000000;
|
else pick.translation |= 0x80000000;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue