Do not use the shader to handle STYLEF_RedIsAlpha.
Turns out that the name doesn't accurately describe what it does. It is correct for images that come with their own palette or are true color. But for images using the game palette it doesn't use the red channel to determine translucency but the palette index! Ugh... This means it cannot be done with a simple operation in the shader because it won't get a proper source image. The only solution is to create a separate texture.
This commit is contained in:
parent
506798f134
commit
b9a6fe80a4
12 changed files with 14 additions and 45 deletions
|
|
@ -144,11 +144,7 @@ void gl_GetRenderStyle(FRenderStyle style, bool drawopaque, bool allowcolorblend
|
|||
int blendequation = renderops[style.BlendOp&15];
|
||||
int texturemode = drawopaque? TM_OPAQUE : TM_MODULATE;
|
||||
|
||||
if (style.Flags & STYLEF_RedIsAlpha)
|
||||
{
|
||||
texturemode = TM_REDTOALPHA;
|
||||
}
|
||||
else if (style.Flags & STYLEF_ColorIsFixed)
|
||||
if (style.Flags & STYLEF_ColorIsFixed)
|
||||
{
|
||||
texturemode = TM_MASK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue