1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 08:12:53 +01:00

Improve rendering of masked sprites in OpenGL drawing engine

This commit is contained in:
William Wallace
2017-07-12 10:12:57 +01:00
committed by Michael Steenbeek
parent 5f1bc914af
commit 09f5019394

View File

@@ -59,11 +59,16 @@ void main()
{
texel = uPalette[texture(uTexture, vec3(fTexColourCoords, float(fTexColourAtlas))).r];
}
vec4 mask = uPalette[texture(uTexture, vec3(fTexMaskCoords, float(fTexMaskAtlas))).r];
if (fMask != 0)
{
oColour = texel * mask;
float mask = texture(uTexture, vec3(fTexMaskCoords, float(fTexMaskAtlas))).r;
if ( mask == 0.0 )
{
discard;
}
oColour = texel;
}
else
{