- added palette shader and fixed a few things.
This commit is contained in:
parent
211a7f2569
commit
221beec979
6 changed files with 20 additions and 8 deletions
|
|
@ -327,7 +327,11 @@ FMaterial::FMaterial(FTexture * tx, bool expanded)
|
|||
}
|
||||
else
|
||||
*/
|
||||
if (tx->bWarped)
|
||||
if (tx->UseType == ETextureType::SWCanvas && tx->WidthBits == 0)
|
||||
{
|
||||
mShaderIndex = SHADER_Paletted;
|
||||
}
|
||||
else if (tx->bWarped)
|
||||
{
|
||||
mShaderIndex = tx->bWarped; // This picks SHADER_Warp1 or SHADER_Warp2
|
||||
tx->shaderspeed = static_cast<FWarpTexture*>(tx)->GetSpeed();
|
||||
|
|
@ -620,6 +624,7 @@ void FMaterial::Bind(int clampmode, int translation)
|
|||
int usebright = false;
|
||||
int maxbound = 0;
|
||||
|
||||
if (tex->UseType == ETextureType::SWCanvas) clampmode = CLAMP_NOFILTER;
|
||||
if (tex->bHasCanvas) clampmode = CLAMP_CAMTEX;
|
||||
else if (tex->bWarped && clampmode <= CLAMP_XY) clampmode = CLAMP_NONE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue